fix(Array, {HeadlessType})
This commit is contained in:
@ -12,10 +12,10 @@ ConstString.prototype.serialize = function(dv, src) {
|
||||
const encoded = new DataView(encoder.encode(src).buffer, 0, this._size)
|
||||
|
||||
if (dv.byteLength < encoded.byteLength) {
|
||||
throw new Error('too small buffer')
|
||||
throw new Error(this._name + ' too small buffer')
|
||||
}
|
||||
if (src.length != this._size) {
|
||||
throw new Error('string should be ' + this._size + ' symbols length')
|
||||
throw new Error(this._name + ' should be ' + this._size + ' symbols length')
|
||||
}
|
||||
|
||||
memcpy(dv, encoded)
|
||||
|
||||
Reference in New Issue
Block a user