summaryrefslogtreecommitdiff
path: root/src/ldump.c
diff options
context:
space:
mode:
authorPeter Drahoš <drahosp@gmail.com>2015-12-16 00:14:02 +0100
committerPeter Drahoš <drahosp@gmail.com>2015-12-16 00:14:02 +0100
commitfcdc5efb13f0d6c03d2868b7476b73e63a291ed3 (patch)
tree5bd844d3ae48e03d1aac8ebef3dd6209549d246e /src/ldump.c
parent94f9f6c6ed0fbc1b49ab4a896d6a587ce8815e36 (diff)
downloadlua-5.3.tar.gz
Updated to lua-5.3.25.3.2lua-5.3
Diffstat (limited to 'src/ldump.c')
-rw-r--r--src/ldump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldump.c b/src/ldump.c
index 4c04812..016e300 100644
--- a/src/ldump.c
+++ b/src/ldump.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldump.c,v 2.36 2015/03/30 15:43:51 roberto Exp $
+** $Id: ldump.c,v 2.37 2015/10/08 15:53:49 roberto Exp $
** save precompiled Lua chunks
** See Copyright Notice in lua.h
*/
@@ -38,7 +38,7 @@ typedef struct {
static void DumpBlock (const void *b, size_t size, DumpState *D) {
- if (D->status == 0) {
+ if (D->status == 0 && size > 0) {
lua_unlock(D->L);
D->status = (*D->writer)(D->L, b, size, D->data);
lua_lock(D->L);