--- Compress-LZF/lzf_c_best.c 2013/08/25 18:13:26 1.1 +++ Compress-LZF/lzf_c_best.c 2015/06/27 19:52:45 1.2 @@ -72,7 +72,7 @@ u8 *out_end = op + out_len; const u8 *first [1 << (6+8)]; /* most recent occurance of a match */ - u16 prev [MAX_OFF]; /* how many bytes to go backwards for te next match */ + u16 prev [MAX_OFF]; /* how many bytes to go backwards for the next match */ int lit; @@ -88,7 +88,7 @@ int best_l = 0; const u8 *best_p; int e = (in_end - ip < MAX_REF ? in_end - ip : MAX_REF) - 1; - unsigned int res = ((unsigned int)ip) & (MAX_OFF - 1); + unsigned int res = ((unsigned long)ip) & (MAX_OFF - 1); u16 hash = HASH (ip); u16 diff; const u8 *b = ip < (u8 *)in_data + MAX_OFF ? in_data : ip - MAX_OFF; @@ -115,7 +115,7 @@ } } - diff = prev [((unsigned int)p) & (MAX_OFF - 1)]; + diff = prev [((unsigned long)p) & (MAX_OFF - 1)]; p = diff ? p - diff : 0; } @@ -159,7 +159,7 @@ do { u16 hash = HASH (ip); - res = ((unsigned int)ip) & (MAX_OFF - 1); + res = ((unsigned long)ip) & (MAX_OFF - 1); p = first [hash]; prev [res] = ip - p; /* update ptr to previous hash match */