From 5b0dec0b3dee712a0f63d45464007bb4b017ec8c Mon Sep 17 00:00:00 2001 From: Zeex Date: Sun, 12 Jan 2014 19:34:02 +0700 Subject: [PATCH] Fix read of uninitialized variable This fixes a copy & paste mistake in commit 53221dd2ccf29fc5e357ffb67363ca7461d24193. --- source/compiler/sc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index f561b6c..4078234 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -5754,7 +5754,7 @@ static void doreturn(void) } else { /* this return statement contains no expression */ ldconst(0,sPRI); - if ((rettype & uRETVALUE)!=0 && (sym->flags & flagNAKED)==0) { + if ((rettype & uRETVALUE)!=0 && (curfunc->flags & flagNAKED)==0) { char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */ assert(curfunc!=NULL); funcdisplayname(symname,curfunc->name);