Fixed a bug: .ENDPROC without .PROC would crash the assembler

git-svn-id: svn://svn.cc65.org/cc65/trunk@2027 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-03-17 10:14:43 +00:00
parent 53518d59c9
commit 7d350d3f61
5 changed files with 31 additions and 13 deletions

View File

@@ -605,8 +605,13 @@ static void DoEnd (void)
static void DoEndProc (void)
/* Leave a lexical level */
{
SymLeaveLevel ();
{
if (!SymIsLocalLevel ()) {
/* No local symbol table level open */
ErrorSkip (ERR_NO_OPEN_PROC);
} else {
SymLeaveLevel ();
}
}