summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/lua/ldump.c
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-21 19:42:06 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-21 19:42:06 +0000
commite79638b70be57501bb9995b24665a109188922fc (patch)
tree9482f9a9fcd5a461a6b9cf1b9742b3bc0df505bb /plugins/MirLua/src/lua/ldump.c
parent8ba0d63234b84060efe27542bf317cb9cf50b3af (diff)
MirLua: lua updated to 5.3.1
git-svn-id: http://svn.miranda-ng.org/main/trunk@14308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/lua/ldump.c')
-rw-r--r--plugins/MirLua/src/lua/ldump.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/MirLua/src/lua/ldump.c b/plugins/MirLua/src/lua/ldump.c
index b6c7114f5d..4c04812a78 100644
--- a/plugins/MirLua/src/lua/ldump.c
+++ b/plugins/MirLua/src/lua/ldump.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldump.c,v 2.34 2014/11/02 19:19:04 roberto Exp $
+** $Id: ldump.c,v 2.36 2015/03/30 15:43:51 roberto Exp $
** save precompiled Lua chunks
** See Copyright Notice in lua.h
*/
@@ -74,14 +74,15 @@ static void DumpString (const TString *s, DumpState *D) {
if (s == NULL)
DumpByte(0, D);
else {
- size_t size = s->len + 1; /* include trailing '\0' */
+ size_t size = tsslen(s) + 1; /* include trailing '\0' */
+ const char *str = getstr(s);
if (size < 0xFF)
DumpByte(cast_int(size), D);
else {
DumpByte(0xFF, D);
DumpVar(size, D);
}
- DumpVector(getstr(s), size - 1, D); /* no need to save '\0' */
+ DumpVector(str, size - 1, D); /* no need to save '\0' */
}
}