mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
[Bitcode] AtEndOfStream should only check against the size if it's known.
This avoids an issue where AtEndOfStream mistakenly returns true at the /start/ of a stream. (In the rare case that the size is known and actually 0, the slow path will still handle it correctly.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -227,7 +227,7 @@ public:
|
||||
bool AtEndOfStream() {
|
||||
if (BitsInCurWord != 0)
|
||||
return false;
|
||||
if (Size == NextChar)
|
||||
if (Size != 0 && Size == NextChar)
|
||||
return true;
|
||||
fillCurWord();
|
||||
return BitsInCurWord == 0;
|
||||
|
Reference in New Issue
Block a user