locale: fix the powerpc build
Reported by: markj (and bde, in a way) MFC after: 3 days X-MFC with: r309364 Sponsored by: Dell EMC
This commit is contained in:
parent
3eceb86920
commit
cf7412f843
@ -500,8 +500,10 @@ format_grouping(const char *binary)
|
||||
rval[0] = '\0';
|
||||
roff = 0;
|
||||
for (cp = binary; *cp != '\0'; ++cp) {
|
||||
#if CHAR_MIN != 0
|
||||
if (*cp < 0)
|
||||
break; /* garbage input */
|
||||
#endif
|
||||
len = snprintf(&rval[roff], sizeof(rval) - roff, "%u;", *cp);
|
||||
if (len < 0 || (unsigned)len >= sizeof(rval) - roff)
|
||||
break; /* insufficient space for output */
|
||||
|
Loading…
Reference in New Issue
Block a user