mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Introduce proper error handling for file streams
This commit is contained in:
@@ -298,7 +298,7 @@ int LuaAreaStore::l_from_file(lua_State *L)
|
||||
const char *filename = luaL_checkstring(L, 2);
|
||||
CHECK_SECURE_PATH(L, filename, false);
|
||||
|
||||
std::ifstream is(filename, std::ios::binary);
|
||||
auto is = open_ifstream(filename, true);
|
||||
return deserialization_helper(L, o->as, is);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user