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/texk/cjkutils/hbf2gf.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/texk/cjkutils/hbf2gf.c')
-rw-r--r-- | Build/source/texk/cjkutils/hbf2gf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/texk/cjkutils/hbf2gf.c b/Build/source/texk/cjkutils/hbf2gf.c index 7a39b24b2ec..598b86cd765 100644 --- a/Build/source/texk/cjkutils/hbf2gf.c +++ b/Build/source/texk/cjkutils/hbf2gf.c @@ -2008,7 +2008,7 @@ rewind(config); do {Q= search_string; -p= tolower(*Q); +p= tolower((unsigned char)*Q); Ch= fgetc(config); ch= tolower(Ch); while(!(ch==p&&old_ch=='\n')&&Ch!=EOF) @@ -2025,7 +2025,7 @@ if((Ch= fgetc(config))==' '||Ch=='\t') goto success; Ch= fgetc(config); -if(tolower(Ch)!=tolower(*Q)) +if(tolower(Ch)!=tolower((unsigned char)*Q)) break; } } @@ -2065,14 +2065,14 @@ continue; } while(*P=='{') P++; -if(!(isalpha(*P)||*P=='_')) +if(!(isalpha((unsigned char)*P)||*P=='_')) {fprintf(stderr, "Invalid environment variable name in configuration file\n"); exit(1); } *(env_p++)= *(P++); while(*P) -{if(isalnum(*P)||*P=='_') +{if(isalnum((unsigned char)*P)||*P=='_') *(env_p++)= *(P++); else {while(*P=='}') |