From d9ce8249cb0f74c652000db085d15208460c857a Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 28 Jan 2015 09:51:02 -0800 Subject: [PATCH] Fix incorrect error line show for incorrect return value on forwards (bug 6226). --- sourcepawn/compiler/sc1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sourcepawn/compiler/sc1.cpp b/sourcepawn/compiler/sc1.cpp index ec76e3d3..687d8c18 100644 --- a/sourcepawn/compiler/sc1.cpp +++ b/sourcepawn/compiler/sc1.cpp @@ -5534,7 +5534,7 @@ static int newfunc(declinfo_t *decl, const int *thistag, int fpublic, int fstati // Check that return tags match. if ((sym->usage & uPROTOTYPED) && !compare_tag(sym->tag, decl->type.tag)) { int old_fline = fline; - fline = sym->lnumber; + fline = funcline; error(25); fline = old_fline; }