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, 1 insertions, 2 deletions
diff --git a/apps/plugins/lua/lobject.c b/apps/plugins/lua/lobject.c
index 62ad8e9359..7f73114303 100644
--- a/apps/plugins/lua/lobject.c
+++ b/apps/plugins/lua/lobject.c
@@ -181,8 +181,7 @@ 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 strncpy(out, source+1, bufflen); /* remove first char */ 184 strlcpy(out, source+1, bufflen); /* remove first char */
185 out[bufflen-1] = '\0'; /* ensures null termination */
186 } 185 }
187 else { /* out = "source", or "...source" */ 186 else { /* out = "source", or "...source" */
188 if (*source == '@') { 187 if (*source == '@') {