Skip to content

Commit

Permalink
Fix LFU Parsing for Values Larger Than 127 (#62)
Browse files Browse the repository at this point in the history
Corrected LFU parsing by casting to uint8 instead of int8 to handle values >127 properly.
  • Loading branch information
moticless authored Dec 24, 2024
1 parent 9783249 commit bcd3db9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ RdbStatus elementFreq(RdbParser *p) {

/*** ENTER SAFE STATE ***/

p->elmCtx.key.info.lfuFreq = *((int8_t *) binfoFreq->ref);
p->elmCtx.key.info.lfuFreq = *((uint8_t *) binfoFreq->ref);
return nextParsingElement(p, PE_NEXT_RDB_TYPE);
}

Expand Down

0 comments on commit bcd3db9

Please sign in to comment.