diff options
| -rw-r--r-- | ldump.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldump.c,v 2.35 2015/01/16 16:54:37 roberto Exp roberto $ | 2 | ** $Id: ldump.c,v 2.36 2015/03/30 15:43:51 roberto Exp roberto $ |
| 3 | ** save precompiled Lua chunks | 3 | ** save precompiled Lua chunks |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -38,7 +38,7 @@ typedef struct { | |||
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | static void DumpBlock (const void *b, size_t size, DumpState *D) { | 40 | static void DumpBlock (const void *b, size_t size, DumpState *D) { |
| 41 | if (D->status == 0) { | 41 | if (D->status == 0 && size > 0) { |
| 42 | lua_unlock(D->L); | 42 | lua_unlock(D->L); |
| 43 | D->status = (*D->writer)(D->L, b, size, D->data); | 43 | D->status = (*D->writer)(D->L, b, size, D->data); |
| 44 | lua_lock(D->L); | 44 | lua_lock(D->L); |
