diff options
Diffstat (limited to 'apps/plugins/lua/lobject.c')
-rw-r--r-- | apps/plugins/lua/lobject.c | 3 |
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 | ||
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 | 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 == '@') { |