@btc-vision/btc-runtime 1.0.25 → 1.0.26
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
|
@@ -154,6 +154,7 @@ export class BytesWriter {
|
|
|
154
154
|
|
|
155
155
|
public writeBytesWithLength(value: Uint8Array): void {
|
|
156
156
|
const length: u32 = u32(value.byteLength);
|
|
157
|
+
|
|
157
158
|
this.allocSafe(length + 4);
|
|
158
159
|
this.writeU32(length);
|
|
159
160
|
|
|
@@ -317,7 +318,9 @@ export class BytesWriter {
|
|
|
317
318
|
bytes[i] = value.charCodeAt(i);
|
|
318
319
|
}
|
|
319
320
|
|
|
320
|
-
|
|
321
|
+
if (value.length < ADDRESS_BYTE_LENGTH) {
|
|
322
|
+
bytes[value.length] = 0;
|
|
323
|
+
}
|
|
321
324
|
|
|
322
325
|
return bytes;
|
|
323
326
|
}
|