aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 064aa53f8..3ca34b4cc 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -1790,7 +1790,7 @@ lua_util_zstd_decompress (lua_State *L)
return 2;
}
- if (zout.pos == zout.size) {
+ if (zin.pos < zin.size && zout.pos == zout.size) {
/* We need to extend output buffer */
zout.size = zout.size * 1.5 + 1.0;
out = g_realloc (zout.dst, zout.size);