@btc-vision/btc-runtime 1.0.22 → 1.0.23

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@btc-vision/btc-runtime",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "Bitcoin Smart Contract Runtime",
5
5
  "main": "btc/index.ts",
6
6
  "types": "btc/index.ts",
@@ -312,7 +312,7 @@ export class BytesWriter {
312
312
  throw new Revert(`Address is too long ${value.length} > ${ADDRESS_BYTE_LENGTH} bytes`);
313
313
  }
314
314
 
315
- const bytes: Uint8Array = new Uint8Array(value.length);
315
+ const bytes: Uint8Array = new Uint8Array(value.length + 1);
316
316
  for (let i: i32 = 0; i < value.length; i++) {
317
317
  bytes[i] = value.charCodeAt(i);
318
318
  }