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:
parent
e70c8eb49a
commit
f5ca440fd0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user