summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lobject.c')
-rw-r--r--apps/plugins/lua/lobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/plugins/lua/lobject.c b/apps/plugins/lua/lobject.c
index 7f73114303..62ad8e9359 100644
--- a/apps/plugins/lua/lobject.c
+++ b/apps/plugins/lua/lobject.c
@@ -181,7 +181,8 @@ const char *luaO_pushfstring (lua_State *L, const char *fmt, ...) {
181 181
182void luaO_chunkid (char *out, const char *source, size_t bufflen) { 182void luaO_chunkid (char *out, const char *source, size_t bufflen) {
183 if (*source == '=') { 183 if (*source == '=') {
184 strlcpy(out, source+1, bufflen); /* remove first char */ 184 strncpy(out, source+1, bufflen); /* remove first char */
185 out[bufflen-1] = '\0'; /* ensures null termination */
185 } 186 }
186 else { /* out = "source", or "...source" */ 187 else { /* out = "source", or "...source" */
187 if (*source == '@') { 188 if (*source == '@') {