Correctly disassemble truncated asm.

Patch by Richard Simth.

llvm-svn: 122962
This commit is contained in:
Rafael Espindola
2011-01-06 16:48:42 +00:00
parent ae67cc13a9
commit 9f9a10691a
3 changed files with 9 additions and 3 deletions

View File

@@ -44,7 +44,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].first;
return 0;