1
0
mirror of https://github.com/janet-lang/janet synced 2025-08-29 17:08:03 +00:00

Merge pull request #1071 from ianthehenry/number-pegfault

fix a segfault in the (number) special
This commit is contained in:
Calvin Rose
2023-02-20 21:01:33 -06:00
committed by GitHub

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) {