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:
parent
746ff5307d
commit
b442b21d3f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user