From e5539962816e5f1048851bf54d362042600609dc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 23 Jan 2008 03:18:36 +0000 Subject: [PATCH] fixed amb1408 - compiler did not warn about invalid public usage --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401864 --- sourcepawn/compiler/sc1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index fc304674..75828758 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -4136,6 +4136,8 @@ static int newfunc(char *firstname,int firsttag,int fpublic,int fstatic,int stoc /* "declargs()" found the ")"; if a ";" appears after this, it was a * prototype */ if (matchtoken(';')) { + if (sym->usage & uPUBLIC) + error(10); sym->usage|=uFORWARD; if (!sc_needsemicolon) error(10); /* old style prototypes used with optional semicolumns */