You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your useful compression code. I found there is a bug in here. The line: for(temp_pointer_length = 0; && uncompressed_text[look_ahead++] == uncompressed_text[look_behind++]; ++temp_pointer_length)
Should be changed to: for(temp_pointer_length = 0; look_ahead < uncompressed_size && uncompressed_text[look_ahead++] == uncompressed_text[look_behind++]; ++temp_pointer_length)
Basically, we should check the array boundary: "look_ahead < uncompressed_size"
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for your useful compression code. I found there is a bug in here. The line:
for(temp_pointer_length = 0; && uncompressed_text[look_ahead++] == uncompressed_text[look_behind++]; ++temp_pointer_length)
Should be changed to:
for(temp_pointer_length = 0; look_ahead < uncompressed_size && uncompressed_text[look_ahead++] == uncompressed_text[look_behind++]; ++temp_pointer_length)
Basically, we should check the array boundary: "look_ahead < uncompressed_size"
The text was updated successfully, but these errors were encountered: