Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit e4b16ee

Browse files
author
Jan Xie
committed
fix byte index in py2
1 parent a359833 commit e4b16ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ethereum/vm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def vm_execute(ext, msg, code):
403403
return vm_exception('OOG COPY DATA')
404404
for i in range(size):
405405
if dstart + i < codelen:
406-
mem[mstart + i] = code[dstart + i]
406+
mem[mstart + i] = safe_ord(code[dstart + i])
407407
else:
408408
mem[mstart + i] = 0
409409
elif op == 'RETURNDATACOPY':
@@ -439,7 +439,7 @@ def vm_execute(ext, msg, code):
439439
return vm_exception('OOG COPY DATA')
440440
for i in range(size):
441441
if s2 + i < len(extcode):
442-
mem[start + i] = utils.safe_ord(extcode[s2 + i])
442+
mem[start + i] = safe_ord(extcode[s2 + i])
443443
else:
444444
mem[start + i] = 0
445445
# Block info

0 commit comments

Comments
 (0)