From 65ea64308a4068db13bbe5f15e765c39efda6ab8 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Sat, 21 Jun 2014 10:45:37 +0000 Subject: MetaPost: Avoid undefined behaviour when char is signed git-svn-id: svn://tug.org/texlive/trunk@34346 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/mplibdir/ChangeLog | 4 ++++ 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 + + * mpxout.w: Avoid undefined behaviour when char is signed. + 2014-06-20 Peter Breitenlohner 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; -- cgit v1.2.3