about summary refs log tree commit diff stats
path: root/source_file.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-08-30 23:52:25 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-08-30 23:52:25 -0700
commit6e54ad55d98ff041db15a1a1157e493d76776dfc (patch)
tree55385ca9c1a4e5a872d450ce62eb879b31340099 /source_file.lua
parent06ad5c4e8ce1c4a78db7eb11b680758fab68cc69 (diff)
downloadlines.love-6e54ad55d98ff041db15a1a1157e493d76776dfc.tar.gz
yet another set of bugfixes
The key API change I'd underestimated: opening a file used to return nil
on failure, and now returns false.
Diffstat (limited to 'source_file.lua')
-rw-r--r--source_file.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/source_file.lua b/source_file.lua
index b0e26eb..dbb6f95 100644
--- a/source_file.lua
+++ b/source_file.lua
@@ -45,7 +45,7 @@ end
 
 function save_to_disk(State)
   local outfile = App.open_for_writing(App.save_dir..State.filename)
-  if outfile == nil then
+  if not outfile then
     error('failed to write to "'..State.filename..'"')
   end
   for _,line in ipairs(State.lines) do