Don't invalidate one byte beyond the end

This commit is contained in:
Oliver Schneider 2018-05-30 12:05:56 +02:00
parent 665866d398
commit 1236d57d84

View File

@ -844,7 +844,7 @@ fn clear_relocations(&mut self, ptr: Pointer, size: Size) -> EvalResult<'tcx> {
}
// Forget all the relocations.
alloc.relocations.remove_range(first ..= last);
alloc.relocations.remove_range(first .. last);
Ok(())
}