Merge pull request #384 from dbrotz/fix-local-label-segfault

Check if parent exists for local label reference
This commit is contained in:
Eldred Habert
2019-08-29 19:05:27 +02:00
committed by GitHub
4 changed files with 10 additions and 0 deletions

View File

@@ -735,6 +735,9 @@ void sym_Ref(char *tzSym)
int isLocal = 0;
if (*tzSym == '.') {
if (!pScope)
fatalerror("Local label reference '%s' in main scope",
tzSym);
fullSymbolName(fullname, sizeof(fullname), tzSym,
pScope);
tzSym = fullname;