[llvm-commits] [llvm] r135533 - /llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Jul 19 15:59:25 PDT 2011
Author: d0k
Date: Tue Jul 19 17:59:25 2011
New Revision: 135533
URL: http://llvm.org/viewvc/llvm-project?rev=135533&view=rev
Log:
Fix off-by-one.
Modified:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=135533&r1=135532&r2=135533&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Tue Jul 19 17:59:25 2011
@@ -107,7 +107,7 @@
uint64_t getExtent() const { return Bytes.size(); }
int readByte(uint64_t Addr, uint8_t *Byte) const {
- if (Addr > getExtent())
+ if (Addr >= getExtent())
return -1;
*Byte = Bytes[Addr];
return 0;
More information about the llvm-commits
mailing list