summaryrefslogtreecommitdiff
path: root/source/luametatex/source/tex/texscanning.c
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2023-05-08 18:02:07 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2023-05-08 18:02:07 +0200
commitbb8ae12f4f94189fd1540b201e2aea78f485de97 (patch)
tree276278bd85ffa1571950669656cbdffe1b8fd68a /source/luametatex/source/tex/texscanning.c
parent51156ffe8b1434d9c1896f12a59554cbe877ee3d (diff)
downloadcontext-bb8ae12f4f94189fd1540b201e2aea78f485de97.tar.gz
2023-05-08 17:39:00
Diffstat (limited to 'source/luametatex/source/tex/texscanning.c')
-rw-r--r--source/luametatex/source/tex/texscanning.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/luametatex/source/tex/texscanning.c b/source/luametatex/source/tex/texscanning.c
index 2b9d6a110..675186681 100644
--- a/source/luametatex/source/tex/texscanning.c
+++ b/source/luametatex/source/tex/texscanning.c
@@ -6095,9 +6095,9 @@ halfword tex_scan_posit(int optional_equal)
tex_back_input(cur_tok);
goto DONE;
}
- if (b >= max_posit_size) {
- goto TOOBIG;
- }
+ if (b >= max_posit_size) {
+ goto TOOBIG;
+ }
}
DECIMALEXPONENT:
if (tex_token_is_exponent(cur_tok)) {
@@ -6192,10 +6192,12 @@ halfword tex_scan_posit(int optional_equal)
}
tex_back_input(cur_tok);
DONE:
- {
+ if (b) {
double d = strtof(buffer, NULL);
cur_val = tex_double_to_posit(d).v;
return cur_val;
+ } else {
+ tex_aux_missing_number_error();
}
TOOBIG:
cur_val = tex_integer_to_posit(0).v;