diff options
author | 2012-09-26 09:00:01 -0400 | |
---|---|---|
committer | 2012-09-26 09:00:01 -0400 | |
commit | a63c51c8df090726c654b239d15568a6d54b9c06 (patch) | |
tree | 8bb9813107354ebc80fbaff185f8350aa1420d19 | |
parent | 467d1f345d635239072dca83bd44cb6e05cbb3de (diff) | |
download | textadept-a63c51c8df090726c654b239d15568a6d54b9c06.tar.gz textadept-a63c51c8df090726c654b239d15568a6d54b9c06.zip |
Ensure Lua stack has enough elements in `lstring_iconv()`; src/textadept.c
Thanks to Gilles for pointing out that I left this part out of his patch.
-rw-r--r-- | src/textadept.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/textadept.c b/src/textadept.c index 9be6c5e1..fa222392 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1434,7 +1434,7 @@ static int lstring_iconv(lua_State *L) { if (errno == E2BIG) { // Buffer was too small to store converted string. Push the partially // converted string for later concatenation. - lua_pushlstring(L, outbuf, outbufp - outbuf), n++; + lua_checkstack(L, 2), lua_pushlstring(L, outbuf, outbufp - outbuf), n++; outbufp = outbuf, outbytesleft = bufsize; } else { free(outbuf), iconv_close(cd); |