Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wtdcode committed May 8, 2022
1 parent 2e8a703 commit 81bb0db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qiling/os/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
#

from ctypes import Union
import os, re
from typing import Any, Callable, List, MutableSequence, Optional, Sequence, Tuple
from typing import Any, Callable, List, MutableSequence, Optional, Sequence, Tuple, Union

from unicorn import UC_PROT_NONE, UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC, UC_PROT_ALL

Expand Down Expand Up @@ -65,6 +64,7 @@ def __write_string(self, addr: int, s: str, encoding: str):
self.write(addr, bytes(s, encoding) + b'\x00')

def __getitem__(self, key: Union[slice, int]) -> bytearray:
print(key)
if isinstance(key, slice):
start = key.start
stop = key.stop
Expand All @@ -81,6 +81,8 @@ def __getitem__(self, key: Union[slice, int]) -> bytearray:
raise KeyError("Wrong type of key")

def __setitem__(self, key: Union[slice, int], value: Union[bytes, bytearray]):
print(key)
print(value)
if isinstance(key, int):
self.ql.mem.write(key, value)
else:
Expand Down

0 comments on commit 81bb0db

Please sign in to comment.