From 6b7c7048b8bb92a0ab2f7ae8749f80349c607ed1 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 15:55:40 +0330 Subject: fndef: allow 24 parameters; the limit check ran after the 24th was counted --- src/compiler/decl.zc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/decl.zc b/src/compiler/decl.zc index 19b1811..5991661 100644 --- a/src/compiler/decl.zc +++ b/src/compiler/decl.zc @@ -326,8 +326,8 @@ int fndef(int chk, int rty, int ret, int n) { pt[np] = t; if (np < 12) tags = tags + (t << (np + np)); np++; - if (np >= 24) die("too many parameters"); if (!accept(s_comma)) break; + if (np >= 24) { die("too many parameters"); break; } // a 25th would not fit pn, pt, pty } } expect(s_rp); -- cgit v1.2.3