summaryrefslogtreecommitdiff
path: root/tex/context/base/page-set.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/page-set.mkiv')
-rw-r--r--tex/context/base/page-set.mkiv8
1 files changed, 4 insertions, 4 deletions
diff --git a/tex/context/base/page-set.mkiv b/tex/context/base/page-set.mkiv
index b7c26035e..9c232f535 100644
--- a/tex/context/base/page-set.mkiv
+++ b/tex/context/base/page-set.mkiv
@@ -327,7 +327,9 @@
{\bgroup
\global\columnfirstcell\ifnum#2=0 1\else#2\fi\relax
\OTRSETsetcorrectnofcells\currentcolumnmaxcells % sets \scratchcounter
- \edef\columnmaxcells{\the\scratchcounter}%
+ \ifnum\scratchcounter<\columnmaxcells\relax
+ \edef\columnmaxcells{\the\scratchcounter}% added 2013.04.19
+ \fi
\ifnum\columnfirstcell>\columnmaxcells
\global\columnfreecells\zerocount
\global\columnfirstcell\plusone
@@ -361,9 +363,7 @@
\ifnum\columnlastcell>\columnmaxcells
\global\columnlastcell\columnmaxcells
\fi
- \global\columnfreecells\columnlastcell
- \global\advance\columnfreecells -\columnfirstcell
- \global\advance\columnfreecells \plusone
+ \global\columnfreecells\numexpr\columnlastcell-\columnfirstcell+\plusone\relax
\global\somefreecolumncellstrue
%\message{\number\columnfirstcell-\number\columnlastcell=\number\columnfreecells}%
\fi