From ccc00b06082b884f05ca96bbea9a6719c526fa28 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 3 Jul 2001 20:42:07 +0000 Subject: [PATCH] fix segs on ondeclared identifiers --- tools/qfcc/source/qc-parse.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index be0cbcece..6b93a5e1a 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -407,6 +407,10 @@ expr $$ = new_expr (); $$->type = ex_def; $$->e.def = PR_GetDef (NULL, $1, pr_scope, false); + if (!$$->e.def) { + error (0, "%s undeclared", $1); + $$->e.def = &def_float; + } } | const { $$ = $1; } | '(' expr ')' { $$ = $2; $$->paren = 1; }