mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-19 16:45:06 +00:00
Improve curico_save_file() error checking
This commit is contained in:
parent
507af9e983
commit
5ae0893592
1 changed files with 3 additions and 1 deletions
|
@ -711,5 +711,7 @@ bool curico_save_file(const char *filename, int x, int y, int components, const
|
||||||
// Just write a PNG using the stb_image_writer callback
|
// Just write a PNG using the stb_image_writer callback
|
||||||
CurIcoImage::WriteToFileContext context = {filename, false};
|
CurIcoImage::WriteToFileContext context = {filename, false};
|
||||||
stbi_write_png_compression_level = 100;
|
stbi_write_png_compression_level = 100;
|
||||||
return stbi_write_png_to_func(&CurIcoImage::WriteToFileCallback, &context, x, y, components, data, 0) != 0;
|
auto stbiResult = stbi_write_png_to_func(&CurIcoImage::WriteToFileCallback, &context, x, y, components, data, 0) != 0;
|
||||||
|
|
||||||
|
return stbiResult && context.success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue