diff options
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -225,7 +225,12 @@ int stream_write(lua_State * L) while (free_space < (int) data_length) { - buffer_grow(L, &s->out); + const int res = buffer_grow(&s->out); + if (-1 == res) + { + lua_pushstring(L, strerror(errno)); + return lua_error(L); + } free_space = s->out.allocated - s->out.length; } |