projects
/
platform
/
upstream
/
flac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1830194
)
fix bug where gcc gets shifting wrong
author
Josh Coalson
<jcoalson@users.sourceforce.net>
Wed, 16 May 2001 19:28:12 +0000
(19:28 +0000)
committer
Josh Coalson
<jcoalson@users.sourceforce.net>
Wed, 16 May 2001 19:28:12 +0000
(19:28 +0000)
src/libFLAC/bitbuffer.c
patch
|
blob
|
history
diff --git
a/src/libFLAC/bitbuffer.c
b/src/libFLAC/bitbuffer.c
index
dff03ca
..
6ec34c9
100644
(file)
--- a/
src/libFLAC/bitbuffer.c
+++ b/
src/libFLAC/bitbuffer.c
@@
-277,7
+277,8
@@
bool FLAC__bitbuffer_write_raw_uint32(FLAC__BitBuffer *bb, uint32 val, unsigned
return true;
if(!bitbuffer_ensure_size_(bb, bits))
return false;
- val &= (~(0xffffffffu << bits)); /* zero-out unused bits */
+ if(bits < 32) /* @@@ gcc seems to require this because the following line causes incorrect results when bits==32; investigate */
+ val &= (~(0xffffffff << bits)); /* zero-out unused bits */
bb->total_bits += bits;
while(bits > 0) {
n = 8 - bb->bits;