1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-18 06:34:48 +00:00

fix a segfault in the (number) special

This was an error about the base argument that referenced the tag argument,
which might not exist.
This commit is contained in:
Ian Henry 2023-02-20 17:04:12 -08:00
parent 746ff5307d
commit b442b21d3f
No known key found for this signature in database

View File

@ -1034,7 +1034,7 @@ static void spec_capture_number(Builder *b, int32_t argc, const Janet *argv) {
emit_3(r, RULE_CAPTURE_NUM, rule, base, tag);
return;
error:
peg_panicf(b, "expected integer between 2 and 36, got %v", argv[2]);
peg_panicf(b, "expected integer between 2 and 36, got %v", argv[1]);
}
static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {