mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix some minor code issues all over the place
This commit is contained in:
parent
289425f6bd
commit
74762470b2
19 changed files with 45 additions and 109 deletions
|
@ -398,10 +398,9 @@ bool ScriptApiSecurity::safeLoadFile(lua_State *L, const char *path, const char
|
|||
lua_pushfstring(L, "%s: %s", path, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
chunk_name = new char[strlen(display_name) + 2];
|
||||
chunk_name[0] = '@';
|
||||
chunk_name[1] = '\0';
|
||||
strcat(chunk_name, display_name);
|
||||
size_t len = strlen(display_name) + 2;
|
||||
chunk_name = new char[len];
|
||||
snprintf(chunk_name, len, "@%s", display_name);
|
||||
}
|
||||
|
||||
size_t start = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue