Skip to content

Commit a1cd16c

Browse files
authored
Merge pull request #68 from Paliak/fix-file-save-guard
Modify guard check in image save function
2 parents 014f545 + 7bfab89 commit a1cd16c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

engine/core/core_image.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ bool targa_c::Load(const char* fileName, std::optional<size_callback_t> sizeCall
250250
bool targa_c::Save(const char* fileName)
251251
{
252252
auto format = tex.format();
253-
if (is_compressed(format) || !is_unsigned_integer(format))
253+
if (is_compressed(format) || !is_unsigned(format))
254254
return true;
255255

256256
int comp = (int)component_count(format);
@@ -317,7 +317,7 @@ bool jpeg_c::Save(const char* fileName)
317317
{
318318
// JPEG only supports RGB and grayscale images
319319
auto format = tex.format();
320-
if (is_compressed(format) || !is_unsigned_integer(format))
320+
if (is_compressed(format) || !is_unsigned(format))
321321
return true;
322322

323323
int comp = (int)component_count(format);
@@ -383,7 +383,7 @@ bool png_c::Load(const char* fileName, std::optional<size_callback_t> sizeCallba
383383
bool png_c::Save(const char* fileName)
384384
{
385385
auto format = tex.format();
386-
if (is_compressed(format) || !is_unsigned_integer(format))
386+
if (is_compressed(format) || !is_unsigned(format))
387387
return true;
388388

389389
int comp = (int)component_count(format);

0 commit comments

Comments
 (0)