diff options
Diffstat (limited to 'src/integer.h')
-rw-r--r-- | src/integer.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/integer.h b/src/integer.h index be7c808..014b53a 100644 --- a/src/integer.h +++ b/src/integer.h | |||
@@ -49,14 +49,16 @@ namespace Gats | |||
49 | if( iIn < 0 ) | 49 | if( iIn < 0 ) |
50 | { | 50 | { |
51 | iIn = -iIn; | 51 | iIn = -iIn; |
52 | b = (iIn&0x3F) | 0x40; | 52 | b = (iIn&0x3F); |
53 | if( iIn > b ) | ||
54 | b |= 0x80 | 0x40; | ||
53 | } | 55 | } |
54 | else | 56 | else |
55 | { | 57 | { |
56 | b = (iIn&0x3F); | 58 | b = (iIn&0x3F); |
59 | if( iIn > b ) | ||
60 | b |= 0x80; | ||
57 | } | 61 | } |
58 | if( iIn > b ) | ||
59 | b |= 0x80; | ||
60 | rStream.write( &b, 1 ); | 62 | rStream.write( &b, 1 ); |
61 | iIn = iIn >> 6; | 63 | iIn = iIn >> 6; |
62 | 64 | ||