Skip to content

Commit

Permalink
Merge pull request #15 from unixdj/signed
Browse files Browse the repository at this point in the history
Fix signed/unsigned comparison
  • Loading branch information
silentbicycle committed May 24, 2015
2 parents a36f56b + 6cecd42 commit a01e1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion heatshrink_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ static uint16_t find_longest_match(heatshrink_encoder *hse, uint16_t start,
pos = hsi->index[pos];
}
#else
for (int16_t pos=end - 1; pos >= start; pos--) {
for (int16_t pos=end - 1; pos >= (int16_t)start; pos--) {
uint8_t * const pospoint = &buf[pos];
if ((pospoint[match_maxlen] == needlepoint[match_maxlen])
&& (*pospoint == *needlepoint)) {
Expand Down

0 comments on commit a01e1e0

Please sign in to comment.