Przeglądaj źródła

Fix io.read option

nagadomi 8 lat temu
rodzic
commit
780e22cf51
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      lib/image_loader.lua

+ 2 - 2
lib/image_loader.lua

@@ -137,7 +137,7 @@ function image_loader.load_float(file)
    if not fp then
       error(file .. ": failed to load image")
    end
-   local buff = fp:read("*a")
+   local buff = fp:read("*all")
    fp:close()
    return image_loader.decode_float(buff)
 end
@@ -146,7 +146,7 @@ function image_loader.load_byte(file)
    if not fp then
       error(file .. ": failed to load image")
    end
-   local buff = fp:read("*a")
+   local buff = fp:read("*all")
    fp:close()
    return image_loader.decode_byte(buff)
 end