diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-19 11:14:35 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-19 11:14:35 +0000 |
commit | e5b8a1a0369901d3d73384cf553619d9351679aa (patch) | |
tree | a0b0d02bb0421b6f6f1dce118d40dfe6e91147b6 /Build/source/utils/t1utils/t1utils-1.38/t1mac.c | |
parent | a7803f3483864a647563ebda46f5fa39a92bb205 (diff) |
texk/*/, utils/*/: Avoid undefined behaviour when char is signed
git-svn-id: svn://tug.org/texlive/trunk@34310 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/t1utils/t1utils-1.38/t1mac.c')
-rw-r--r-- | Build/source/utils/t1utils/t1utils-1.38/t1mac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/utils/t1utils/t1utils-1.38/t1mac.c b/Build/source/utils/t1utils/t1utils-1.38/t1mac.c index 007e5802a2f..9411a89a70d 100644 --- a/Build/source/utils/t1utils/t1utils-1.38/t1mac.c +++ b/Build/source/utils/t1utils/t1utils-1.38/t1mac.c @@ -370,10 +370,10 @@ t1mac_output_ascii(char *s, int len) s[len-1] = '\r'; t1mac_output_data((byte *)s, len); if (strncmp(s, "/FontName", 9) == 0) { - for (s += 9; isspace(*s); s++) ; + for (s += 9; isspace((unsigned char)*s); s++) ; if (*s == '/') { const char *t = ++s; - while (*t && !isspace(*t)) t++; + while (*t && !isspace((unsigned char)*t)) t++; free(font_name); font_name = (char *)malloc(t - s + 1); memcpy(font_name, s, t - s); @@ -992,11 +992,11 @@ particular purpose.\n"); int part = 0, len = 0; char *x, *s; for (x = s = font_name; *s; s++) - if (isupper(*s) || isdigit(*s)) { + if (isupper((unsigned char)*s) || isdigit((unsigned char)*s)) { *x++ = *s; part++; len = 1; - } else if (islower(*s)) { + } else if (islower((unsigned char)*s)) { if (len < (part <= 1 ? 5 : 3)) *x++ = *s; len++; |