Skip to content

Commit

Permalink
Fix for a comparison always false
Browse files Browse the repository at this point in the history
Fixes #458
comparison is always false due to limited range of data type
  • Loading branch information
mm2 committed Aug 20, 2024
1 parent aa70a95 commit c48f98c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmscgats.c
Original file line number Diff line number Diff line change
Expand Up @@ -1614,8 +1614,8 @@ cmsInt32Number satoi(const char* b)
if (b == NULL) return 0;

n = atoi(b);
if (n > 0x7fffffffL) return 0x7fffffffL;
if (n < -0x7ffffffeL) return -0x7ffffffeL;
if (n > 0x7ffffff0L) return 0x7ffffff0L;
if (n < -0x7ffffff0L) return -0x7ffffff0L;

return (cmsInt32Number)n;
}
Expand Down

0 comments on commit c48f98c

Please sign in to comment.