Skip to content

Commit cc3f91e

Browse files
committed
Makes masks unsigned ints
1 parent e164c27 commit cc3f91e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/entropy/TPAQPredictor.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ namespace kanzi
100100
uint8* _bigStatesMap;// hash table(context, prediction)
101101
uint8* _smallStatesMap0; // hash table(context, prediction)
102102
uint8* _smallStatesMap1; // hash table(context, prediction)
103-
int _statesMask;
104-
int _mixersMask;
105-
int _hashMask;
106-
int _bufferMask;
103+
uint _statesMask;
104+
uint _mixersMask;
105+
uint _hashMask;
106+
uint _bufferMask;
107107
uint8* _cp0; // context pointers
108108
uint8* _cp1;
109109
uint8* _cp2;
@@ -547,7 +547,7 @@ namespace kanzi
547547
_matchPos = _hashes[_hash];
548548

549549
// Detect match
550-
if ((_matchPos != 0) && (_pos - _matchPos <= _bufferMask)) {
550+
if ((_matchPos != 0) && (uint(_pos - _matchPos) <= _bufferMask)) {
551551
int r = _matchLen + 2;
552552

553553
while (r <= MAX_LENGTH) {

0 commit comments

Comments
 (0)