aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 15:55:40 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 15:55:40 +0330
commit6b7c7048b8bb92a0ab2f7ae8749f80349c607ed1 (patch)
treec082aa97127faada26fc39fc652fc922e6f84f05 /src
parentcasts: a cast clears the byte-string flag unless the type is bstr, so (int*)s... (diff)
fndef: allow 24 parameters; the limit check ran after the 24th was counted
Diffstat (limited to 'src')
-rw-r--r--src/compiler/decl.zc2
1 files changed, 1 insertions, 1 deletions
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);