From 88f78aa8824e9182b50464e34955c1636ab93c75 Mon Sep 17 00:00:00 2001 From: Zeex Date: Sat, 20 Jun 2015 09:59:24 +0600 Subject: [PATCH] Don't declare public constants as constants Public constants must be declared as variables, like it was done before the previous commit, because they must be visible by the amx_XXXPubVar API. --- source/compiler/sc1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 3406fb0..47f7947 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -1861,7 +1861,7 @@ static void declfuncvar(int fpublic,int fstatic,int fstock,int fconst) invalidfunc= fconst || (fpublic && fstock); if (invalidfunc || !newfunc(name,tag,fpublic,fstatic,fstock)) { /* if not a function, try a global constant/variable */ - if (fconst) { + if (fconst && !fpublic) { lexpush(); decl_const(sGLOBAL); } else { @@ -2345,7 +2345,7 @@ static int base; for (d=0; d