Fixed crash on Windows due to not ensuring file mode is binary for saving app icons

This commit is contained in:
2022-02-07 13:31:35 -06:00
parent a9f5c29a18
commit e267a17c76
2 changed files with 3 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ GEM
rake (>= 12.0.0, < 14.0.0)
excon (0.78.1)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
ffi (1.15.5-x64-mingw32)
fiber-local (1.0.0)
gosu (1.4.1)
@@ -61,6 +62,7 @@ GEM
timers (4.3.3)
PLATFORMS
x64-mingw-ucrt
x64-mingw32
x86_64-linux

View File

@@ -134,7 +134,7 @@ class W3DHub
if image_bmp?(image)
to_rgba32_blob(image).save(filename)
else
File.write(filename, image_data(image))
File.open(filename, "wb") { |f| f.write(image_data(image)) }
end
end
end