From 6a2ec150418e11812136086c650a6de1b8afe851 Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Wed, 23 Jul 2014 18:49:38 -0500 Subject: [PATCH] Fix error message 102 to include the spectype that's missing. Additionally this fixes invalid usage of error 102 in grow_stgbuffer. --- sourcepawn/compiler/sc1.c | 2 +- sourcepawn/compiler/sc7.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 52b7ee05..3528f736 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -3972,7 +3972,7 @@ static void domethodmap(LayoutSpec spec) } if ((parent = methodmap_find_by_name(str)) == NULL) { - error(102, str); + error(102, spectype, str); } else if (parent->spec != spec) { error(129); } diff --git a/sourcepawn/compiler/sc7.c b/sourcepawn/compiler/sc7.c index aee59864..4272fe26 100644 --- a/sourcepawn/compiler/sc7.c +++ b/sourcepawn/compiler/sc7.c @@ -95,14 +95,14 @@ static void grow_stgbuffer(char **buffer, int *curmax, int requiredsize) * over a few kBytes, there is probably a run-away expression */ if (requiredsize>sSTG_MAX) - error(102,"staging buffer"); /* staging buffer overflow (fatal error) */ + error(163); /* staging buffer overflow (fatal error) */ *curmax=requiredsize+sSTG_GROW; if (*buffer!=NULL) p=(char *)realloc(*buffer,*curmax*sizeof(char)); else p=(char *)malloc(*curmax*sizeof(char)); if (p==NULL) - error(102,"staging buffer"); /* staging buffer overflow (fatal error) */ + error(163); /* staging buffer overflow (fatal error) */ *buffer=p; if (clear) **buffer='\0';