From e1140d476aa3f9c14cfa13ee1cc8e918fdc3fd24 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 15 Mar 2020 16:19:45 +0900 Subject: [PATCH] [qfcc] Handle syntax errors in method protos --- 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 6ca42392c..7f257505b 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -2020,6 +2020,10 @@ methodproto $2->instance = 0; $$ = $2; } + | '-' error ';' + { $$ = new_method (&type_id, new_param ("", 0, 0), 0); } + | '+' error ';' + { $$ = new_method (&type_id, new_param ("", 0, 0), 0); } | '-' methoddecl ';' { $2->instance = 1;