mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
plugins/timer: don't fail if file is corrupt (nw)
This commit is contained in:
parent
169b790b99
commit
2028ec2917
1 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,12 @@ function timer.startplugin()
|
|||
play_count = file:read("n")
|
||||
file:close()
|
||||
end
|
||||
if not play_count then
|
||||
play_count = 0
|
||||
end
|
||||
if not total_time then
|
||||
total_time = 0
|
||||
end
|
||||
start_time = os.time()
|
||||
play_count = play_count + 1
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue