fix(Array, {HeadlessType})

This commit is contained in:
2025-08-06 16:20:14 +03:00
parent 35a98456ef
commit 16789a942e
12 changed files with 246 additions and 74 deletions

View File

@ -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)