fix h_read_bits path for BYTE_LITTLE_ENDIAN
This commit is contained in:
parent
5f920b29f8
commit
4a90a0be66
1 changed files with 3 additions and 2 deletions
|
|
@ -62,9 +62,10 @@ int64_t h_read_bits(HInputStream* state, int count, char signed_p) {
|
|||
out = (out << 8) | state->input[state->index++];
|
||||
}
|
||||
} else {
|
||||
while (count > 0) {
|
||||
int i;
|
||||
for (i = 0; count > 0; i += 8) {
|
||||
count -= 8;
|
||||
out |= state->input[state->index++] << count;
|
||||
out |= state->input[state->index++] << i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue