mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Fix some minor code issues all over the place
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user