Avoid an integer underflow error.
This commit is contained in:
parent
e910d40e6a
commit
de10839f96
1 changed files with 2 additions and 1 deletions
|
@ -119,7 +119,8 @@ impl Memory {
|
|||
|
||||
for &mut (ref mut offset, _) in &mut relocations {
|
||||
alloc.relocations.remove(offset);
|
||||
*offset += dest.offset - src.offset;
|
||||
*offset += dest.offset;
|
||||
*offset -= src.offset;
|
||||
}
|
||||
|
||||
(bytes, relocations)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue