Skip to content

Commit 85fcd48

Browse files
committed
fix: cast to bytes in MemoryResolver instead of returning the slice directly
1 parent e282510 commit 85fcd48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libdestruct/backing/memory_resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def absolute_from_own(self: MemoryResolver, address: int) -> MemoryResolver:
4545
def resolve(self: MemoryResolver, size: int, _: int) -> bytes:
4646
"""Resolves itself, providing the bytes it references for the specified size and index."""
4747
address = self.resolve_address()
48-
return self.memory[address : address + size]
48+
return bytes(self.memory[address : address + size])
4949

5050
def modify(self: MemoryResolver, size: int, _: int, value: bytes) -> None:
5151
"""Modifies itself in memory."""

0 commit comments

Comments
 (0)