From: Daniel Jacobowitz Date: Thu, 7 Jun 2007 14:24:15 +0000 (+0000) Subject: * target-memory.c (blocks_to_erase): Correct off-by-one error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fc01e0339a2ffbae943acefdc99dbf3bda68274;p=binutils-gdb.git * target-memory.c (blocks_to_erase): Correct off-by-one error. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5743d9ec099..b7bdc7b32a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2007-06-07 Daniel Jacobowitz + + * target-memory.c (blocks_to_erase): Correct off-by-one error. + 2007-06-06 Vladimir Prus * remote.c (process_g_packet): Don't check size. diff --git a/gdb/target-memory.c b/gdb/target-memory.c index 056440ace9f..cb6acc593a8 100644 --- a/gdb/target-memory.c +++ b/gdb/target-memory.c @@ -166,7 +166,7 @@ blocks_to_erase (VEC(memory_write_request_s) *written) CORE_ADDR begin, end; block_boundaries (ptr->begin, &begin, 0); - block_boundaries (ptr->end, 0, &end); + block_boundaries (ptr->end - 1, 0, &end); if (!VEC_empty (memory_write_request_s, result) && VEC_last (memory_write_request_s, result)->end >= begin)