Skip to content

Commit 6475028

Browse files
hageboecksponce
authored andcommitted
Fix stray .0 in memorystack.
There were floating-point numbers passed into macros expecting integers. Parsing stops before the .0, generating the warnings "no . in font nullfont" and "no 0 in font nullfont".
1 parent 751b750 commit 6475028

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

talk/setup.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
\pgfmathsetmacro{\nbbars}{\stacknbblocks-1}
265265
\pgfmathtruncatemacro\nbbarstrunc{\nbbars}
266266
\ifnum\nbbarstrunc>0
267-
\foreach \n in {1,...,\nbbars} {
267+
\foreach \n in {1,...,\nbbarstrunc} {
268268
\draw[\stackcolor!70] (0,\n*\stacksizey) -- +(\stacksizex,0);
269269
}
270270
\fi
@@ -276,15 +276,16 @@
276276
}
277277
\ifnum1=\displayaddrs\relax
278278
\pgfmathparse{(\n-1)*\blocksize*\stackwordsize+\stackbaseaddr}
279-
\pgfmathdectoBase\hexversion{\pgfmathresult}{16}
279+
\pgfmathtruncatemacro\addressdec{\pgfmathresult}
280+
\pgfmathdectoBase\hexversion{\addressdec}{16}
280281
\draw node at (\stacksizex,\n*\stacksizey-\stacksizey/2) [right=2pt]
281282
{0x\hexversion};
282283
\fi
283284
}
284285
\pgfmathsetmacro{\nbseps}{\stackwordsize-1}
285286
\pgfmathtruncatemacro\nbsepstrunc{\nbseps}
286287
\ifnum\nbsepstrunc>0
287-
\foreach \n in {1,...,\nbseps} {
288+
\foreach \n in {1,...,\nbsepstrunc} {
288289
\draw[\stackcolor!10] (\stacksizex/\stackwordsize*\n,0) -- +(0,\stacknbblocks*\stacksizey);
289290
}
290291
\fi
@@ -341,7 +342,8 @@
341342
block size/.get=\blocksize,
342343
}
343344
\pgfmathparse{(#2-1)*\stackwordsize*\blocksize+\stackbaseaddr}
344-
\pgfmathdectoBase\hexaddress{\pgfmathresult}{16}
345+
\pgfmathtruncatemacro\addressdec{\pgfmathresult}
346+
\pgfmathdectoBase\hexaddress{\addressdec}{16}
345347
\memorypushvalue{\arabic{memorystackindex}}{1}{#1 0x\hexaddress}
346348
\draw[\stackcolor!80,->] (stack\arabic{memorystackindex}-1.west) .. controls +(left:1) and +(left:1) .. (stack#2-1.west);
347349
\addtocounter{memorystackindex}{1}

0 commit comments

Comments
 (0)