encoding: fix asserts.

This commit is contained in:
Christopher Jeffrey 2017-03-15 07:21:04 -07:00
parent 66c4fd8a77
commit b2649a6cd1
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1090,10 +1090,10 @@ function inherits(obj, from) {
function enforce(value, offset, reason) {
if (!value)
throw new EncodingError(offset, reason);
throw new encoding.EncodingError(offset, reason);
}
function assert(value, offset) {
if (!value)
throw new EncodingError(offset, 'Out of bounds read');
throw new encoding.EncodingError(offset, 'Out of bounds read');
}