Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Mar 15, 2024
1 parent fa0706a commit 6895bf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ enum {FALSE_WIN = 0};
#define cimg_fuint64 "%llu"
#define cimg_fint64 "%lld"
#endif
#define cimg_fhex64 "%llx"

#else

Expand All @@ -246,11 +247,13 @@ enum {FALSE_WIN = 0};
#define cimg_int64 long long
#define cimg_fuint64 "%llu"
#define cimg_fint64 "%lld"
#define cimg_fhex64 "%llx"
#else
#define cimg_uint64 unsigned long
#define cimg_int64 long
#define cimg_fuint64 "%lu"
#define cimg_fint64 "%ld"
#define cimg_fhex64 "%lx"
#endif

#if defined(__arm__) || defined(_M_ARM)
Expand Down Expand Up @@ -17275,7 +17278,7 @@ namespace cimg_library {
else if (!cimg::strcasecmp(s,"nan")) { val = cimg::type<double>::nan(); nb = 1; }
} else if (*s=='0' && (s[1]=='x' || s[1]=='X') && s[2]!='-') { // Hexadecimal literal
cimg_uint64 num;
if ((nb = cimg_sscanf(s + 2,"%lx%c",&num,&sep))==1 || (nb==2 && sep=='%'))
if ((nb = cimg_sscanf(s + 2,cimg_fhex64 "%c",&num,&sep))==1 || (nb==2 && sep=='%'))
val = (double)num;
} else if (*s=='0' && (s[1]=='b' || s[1]=='B') && s[2]!='-') { // Binary literal
variable_name.assign(65);
Expand Down

0 comments on commit 6895bf2

Please sign in to comment.