diff options
Diffstat (limited to 'apps/plugins/lua/lobject.c')
-rw-r--r-- | apps/plugins/lua/lobject.c | 3 |
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 | ||
182 | void luaO_chunkid (char *out, const char *source, size_t bufflen) { | 182 | void 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 == '@') { |