diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-21 10:45:37 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-21 10:45:37 +0000 |
commit | 65ea64308a4068db13bbe5f15e765c39efda6ab8 (patch) | |
tree | bc2dd579727d9c5e566df7805e2c60c74859d968 /Build/source/texk | |
parent | fe16637d6e50258433ab63b341bca68894ac265f (diff) |
MetaPost: Avoid undefined behaviour when char is signed
git-svn-id: svn://tug.org/texlive/trunk@34346 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/mplibdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/mplibdir/mpxout.w | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog index 56bfe987aa8..203996cfa1a 100644 --- a/Build/source/texk/web2c/mplibdir/ChangeLog +++ b/Build/source/texk/web2c/mplibdir/ChangeLog @@ -1,3 +1,7 @@ +2014-06-21 Peter Breitenlohner <peb@mppmu.mpg.de> + + * mpxout.w: Avoid undefined behaviour when char is signed. + 2014-06-20 Peter Breitenlohner <peb@mppmu.mpg.de> Import metapost 1.999 diff --git a/Build/source/texk/web2c/mplibdir/mpxout.w b/Build/source/texk/web2c/mplibdir/mpxout.w index 68f4af66339..c26881b0f24 100644 --- a/Build/source/texk/web2c/mplibdir/mpxout.w +++ b/Build/source/texk/web2c/mplibdir/mpxout.w @@ -2751,9 +2751,9 @@ used anyway - thus just skip the value, @c static float mpx_get_float_map(MPX mpx, char *s) { if (s != NULL) { - while (isspace(*s)) + while (isspace((unsigned char)*s)) s++; - while (!isspace(*s) && *s) + while (!isspace((unsigned char)*s) && *s) s++; } mpx->arg_tail = s; |