Skip to content

Commit f94b6ab

Browse files
jujkripken
andauthored
Update src/parseTools.js
Address review Co-authored-by: Alon Zakai <alonzakai@gmail.com>
1 parent 56af0f3 commit f94b6ab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/parseTools.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,11 @@ function convertPtrToIdx(ptr, accessWidth) {
13541354

13551355
let conversion;
13561356
if (MEMORY64) {
1357-
if (MAXIMUM_MEMORY > MAX_MEMORY53) conversion = /^\d+$/.test(accessWidth) ? `${ptr} >>= ${accessWidth}n` : `${ptr} >>= BigInt(${accessWidth})`;
1358-
else conversion = `${ptr} = Number(${ptr}) / ${accessWidth}`;
1357+
if (MAXIMUM_MEMORY > MAX_MEMORY53) {
1358+
conversion = /^\d+$/.test(accessWidth) ? `${ptr} >>= ${accessWidth}n` : `${ptr} >>= BigInt(${accessWidth})`;
1359+
} else {
1360+
conversion = `${ptr} = Number(${ptr}) / ${accessWidth}`;
1361+
}
13591362
} else if (MAXIMUM_MEMORY > 2 * 1024 * 1024 * 1024) {
13601363
conversion = `${ptr} >>>= ${accessWidth}`;
13611364
} else {

0 commit comments

Comments
 (0)