From b4817ac338ffd79bbd0bd9e407649af39cfdc6cf Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Fri, 16 Oct 2015 02:11:03 +0000 Subject: web2c/mplibdir: Sync with the upstream. git-svn-id: svn://tug.org/texlive/trunk@38660 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/mplibdir/ChangeLog | 4 ++++ Build/source/texk/web2c/mplibdir/mpmathbinary.w | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog index 2fea7b05585..2a17d503b06 100644 --- a/Build/source/texk/web2c/mplibdir/ChangeLog +++ b/Build/source/texk/web2c/mplibdir/ChangeLog @@ -1,3 +1,7 @@ +2015-10-16 Akira Kakuto + + * mpmathbinary.w: Sync with the upstream. + 2015-10-15 Akira Kakuto * mpmathbinary.w: Sync with the upstream. diff --git a/Build/source/texk/web2c/mplibdir/mpmathbinary.w b/Build/source/texk/web2c/mplibdir/mpmathbinary.w index f20061de46a..4d7301579a1 100644 --- a/Build/source/texk/web2c/mplibdir/mpmathbinary.w +++ b/Build/source/texk/web2c/mplibdir/mpmathbinary.w @@ -902,8 +902,8 @@ void mp_wrapup_numeric_token(MP mp, unsigned char *start, unsigned char *stop) { lp = strchr(bufp,'.') ? lp-1: lp; /* strip also trailing 0s */ bufp = buf+l-1; - while(*bufp == '0') {bufp--; lp=( (lp==0)||(lp==1)?1:lp--);} - /* force at last one digit, even if the number is 0 */ + while(*bufp == '0') {bufp--; lp=( ((lp==0)||(lp==1))?1:lp-1);} + /* at least one digit, even if the number is 0 */ lp = lp>0? lp: 1; /* bits needed for buf */ lpbit = (unsigned long)ceil(lp/log10(2)+1); -- cgit v1.2.3