Add safe-guard in getNumFromBits()

This commit is contained in:
Stephan Hadinger 2020-05-21 20:54:45 +02:00
parent c8b5750568
commit 609e7369bd
1 changed files with 1 additions and 0 deletions

View File

@ -420,6 +420,7 @@ int32_t Unishox::getNumFromBits(uint32_t count) {
while (count--) {
ret += getNextBit() << count;
}
if (in_eof) return 0;
return ret;
}