From 61e0a756c8bd5b2b5c5501bffd7a65486f8b1249 Mon Sep 17 00:00:00 2001 From: Luigi Scarso Date: Fri, 24 Mar 2017 00:34:01 +0000 Subject: fixed increment of header_last. git-svn-id: svn://tug.org/texlive/trunk@43591 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/mplibdir/mp.w | 10 +++++++++- Build/source/texk/web2c/mplibdir/mpmath.w | 2 +- Build/source/texk/web2c/mplibdir/mpmathdouble.w | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w index adea5f18f17..4d48514a1d7 100644 --- a/Build/source/texk/web2c/mplibdir/mp.w +++ b/Build/source/texk/web2c/mplibdir/mp.w @@ -33232,9 +33232,15 @@ We may need to cancel skips that span more than 127 lig/kern steps. @ The header could contain ASCII zeroes, so can't use |strdup|. +The index |j| can be beyond the index |header_last|, hence we +have to sure to update the end of stream marker to reflect the +actual position. @= j--; +if (mp->header_lastheader_last=j; +} do { if (j >= mp->header_size) { size_t l = (size_t) (mp->header_size + (mp->header_size / 4)); @@ -33246,8 +33252,10 @@ do { mp->header_size = (int) l; } mp->header_byte[j] = (char) mp_get_code (mp); + if (mp->header_lastheader_last); + } incr (j); - incr (mp->header_last); } while (cur_cmd() == mp_comma) @ @= diff --git a/Build/source/texk/web2c/mplibdir/mpmath.w b/Build/source/texk/web2c/mplibdir/mpmath.w index 0195d608d85..6c0ee6d00a6 100644 --- a/Build/source/texk/web2c/mplibdir/mpmath.w +++ b/Build/source/texk/web2c/mplibdir/mpmath.w @@ -1,4 +1,4 @@ -% $Id: mpmath.w 2070 2015-10-06 10:35:23Z luigi $ +% $Id: mpmath.w 2118 2017-02-15 17:49:54Z luigi $ % % This file is part of MetaPost; % the MetaPost program is in the public domain. diff --git a/Build/source/texk/web2c/mplibdir/mpmathdouble.w b/Build/source/texk/web2c/mplibdir/mpmathdouble.w index 92339309869..cb14969365f 100644 --- a/Build/source/texk/web2c/mplibdir/mpmathdouble.w +++ b/Build/source/texk/web2c/mplibdir/mpmathdouble.w @@ -1,4 +1,4 @@ -% $Id: mpmathdouble.w 2091 2016-09-16 23:07:58Z luigi $ +% $Id: mpmathdouble.w 2118 2017-02-15 17:49:54Z luigi $ % % This file is part of MetaPost; % the MetaPost program is in the public domain. -- cgit v1.2.3