Correctly disassemble truncated asm.

Patch by Richard Simth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122962 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-01-06 16:48:42 +00:00
parent 8143a84c46
commit 2f867a63da
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;