1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-26 07:03:16 +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
commit 1144c27c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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