@btc-vision/btc-runtime 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -313,7 +313,8 @@ export class BytesWriter {
|
|
|
313
313
|
throw new Revert(`Address is too long ${value.length} > ${ADDRESS_BYTE_LENGTH} bytes`);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
const
|
|
316
|
+
const length: i32 = Math.min(value.length + 1, ADDRESS_BYTE_LENGTH);
|
|
317
|
+
const bytes: Uint8Array = new Uint8Array(length);
|
|
317
318
|
for (let i: i32 = 0; i < value.length; i++) {
|
|
318
319
|
bytes[i] = value.charCodeAt(i);
|
|
319
320
|
}
|