Skip to content

Commit

Permalink
fix: itob for uint64 should return 8 bytes when evaluating to a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Nov 21, 2024
1 parent 9ecccf0 commit fadeecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/awst/intrinsic-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const intrinsicFactory = {
if (value instanceof awst.IntegerConstant) {
return nodeFactory.bytesConstant({
sourceLocation,
value: bigIntToUint8Array(value.value),
value: bigIntToUint8Array(value.value, value.wtype.equals(wtypes.uint64WType) ? 8 : 'dynamic'),
encoding: BytesEncoding.base16,
})
}
Expand Down

0 comments on commit fadeecc

Please sign in to comment.