aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-09-26 09:00:01 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-09-26 09:00:01 -0400
commita63c51c8df090726c654b239d15568a6d54b9c06 (patch)
tree8bb9813107354ebc80fbaff185f8350aa1420d19 /src/textadept.c
parent467d1f345d635239072dca83bd44cb6e05cbb3de (diff)
downloadtextadept-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.
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c2
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);