summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/attr-ini.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-08-05 12:41:19 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-08-05 12:41:19 +0200
commit79db9f0bfc67ea8b4ed21d966e270f0adddfd8b8 (patch)
tree47d1b3ffd491caa9bd24117387d7eb7ba5535637 /tex/context/base/mkxl/attr-ini.lmt
parent1e83b1b27a30fc8df44607a37103b6c65efec538 (diff)
downloadcontext-79db9f0bfc67ea8b4ed21d966e270f0adddfd8b8.tar.gz
2022-08-05 11:41:00
Diffstat (limited to 'tex/context/base/mkxl/attr-ini.lmt')
-rw-r--r--tex/context/base/mkxl/attr-ini.lmt10
1 files changed, 6 insertions, 4 deletions
diff --git a/tex/context/base/mkxl/attr-ini.lmt b/tex/context/base/mkxl/attr-ini.lmt
index 059de8fd7..8b2ec8911 100644
--- a/tex/context/base/mkxl/attr-ini.lmt
+++ b/tex/context/base/mkxl/attr-ini.lmt
@@ -216,12 +216,14 @@ function attributes.registervalue(index,value)
-- this can be an option
for i=c[1],c[2] do
if list[i] == nil then
+ -- we avoid 0 because that can be a signal attribute value
+ local n = i == 0 and 1 or i
if trace_values then
- report_value("reusing slot %i for attribute %i in range (%i,%i)",i,index,c[1],c[2])
+ report_value("reusing slot %i for attribute %i in range (%i,%i)",n,index,c[1],c[2])
end
- c[1] = i
- list[i] = value
- return i
+ c[1] = n
+ list[n] = value
+ return n
end
end
else