Fix long standing issue in this code from 2002

This commit is contained in:
Sam Trenholme 2023-05-02 16:35:04 -07:00
parent 20b7ac02ad
commit bab062bde4

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2002-2006 Sam Trenholme
/* Copyright (c) 2002-2023 Sam Trenholme
*
* TERMS
*
@ -884,7 +884,7 @@ int decomp_get_rddata(js_string *compressed, js_string *out,
/* Variable length data (length determined by rdlength) */
else if(subtype == RRSUB_VARIABLE) {
len = rdlength - total;
if(len == 0) {
if(len <= 0) {
break;
}
if(decomp_append_bytes(compressed,out,