1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-12 03:13:00 +00:00

Prefix all loaded strings with "="

Whilst this is not consistent with normal Lua, this is required in order
to remain compatible with LuaJ.
This commit is contained in:
SquidDev
2017-05-01 18:57:10 +01:00
parent 73873eb8cb
commit 0bd0f4d313
2 changed files with 93 additions and 1 deletions

View File

@@ -541,7 +541,7 @@ loadfile = function( _sFile, _tEnv )
end
local file = fs.open( _sFile, "r" )
if file then
local func, err = load( file.readAll(), fs.getName( _sFile ), "t", _tEnv )
local func, err = load( file.readAll(), "@" .. fs.getName( _sFile ), "t", _tEnv )
file.close()
return func, err
end