mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
made read_config in hiscore lua plugin more robust
This commit is contained in:
parent
88909dc0d0
commit
9764233875
@ -46,8 +46,10 @@ function hiscore.startplugin()
|
||||
emu.print_verbose( "hiscore: config found" );
|
||||
local _conf = {}
|
||||
for line in io.lines(config_path) do
|
||||
token, value = string.match(line, '([^ ]+) ([^ ]+)');
|
||||
_conf[token] = value;
|
||||
token, spaces, value = string.match(line, '([^ ]+)([ ]+)([^ ]+)');
|
||||
if token ~= nil and token ~= '' then
|
||||
_conf[token] = value;
|
||||
end
|
||||
end
|
||||
hiscore_path = lfs.env_replace(_conf["hi_path"] or hiscore_path);
|
||||
timed_save = _conf["only_save_at_exit"] ~= "1"
|
||||
|
Loading…
Reference in New Issue
Block a user