1
Fork 0

Avoid an integer underflow error.

This commit is contained in:
Scott Olson 2016-03-18 12:11:57 -06:00
parent e910d40e6a
commit de10839f96

View file

@ -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)