Skip to content

Commit bcd3db9

Browse files
authored
Fix LFU Parsing for Values Larger Than 127 (#62)
Corrected LFU parsing by casting to uint8 instead of int8 to handle values >127 properly.
1 parent 9783249 commit bcd3db9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/parser.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ RdbStatus elementFreq(RdbParser *p) {
15711571

15721572
/*** ENTER SAFE STATE ***/
15731573

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

0 commit comments

Comments
 (0)