1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Fix off-by-one.

llvm-svn: 135533
This commit is contained in:
Benjamin Kramer 2011-07-19 22:59:25 +00:00
parent e70c8eb49a
commit f5ca440fd0

View File

@ -107,7 +107,7 @@ public:
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;