From 5d71f1f737b5132c7e3050796e228c3f453db177 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 24 Sep 2001 07:41:21 +0000 Subject: [PATCH] Fixed nasty bug in error handling. It should have been setting the return bytecode value to NULL on error, but wasn't (random return value is bad!). svn path=/trunk/yasm/; revision=221 --- modules/parsers/nasm/gen_instr.pl | 1 + src/parsers/nasm/gen_instr.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/parsers/nasm/gen_instr.pl b/modules/parsers/nasm/gen_instr.pl index 3561a3e8..5b933de4 100755 --- a/modules/parsers/nasm/gen_instr.pl +++ b/modules/parsers/nasm/gen_instr.pl @@ -810,6 +810,7 @@ sub output_yacc ($@) # ASSUMES: at least one previous action exists print GRAMMAR " | \Ugrp_$group\E error {\n"; print GRAMMAR " Error (_(\"expression syntax error\"));\n"; + print GRAMMAR " \$\$ = (bytecode *)NULL\n"; print GRAMMAR " }\n"; # terminate the rule diff --git a/src/parsers/nasm/gen_instr.pl b/src/parsers/nasm/gen_instr.pl index 3561a3e8..5b933de4 100755 --- a/src/parsers/nasm/gen_instr.pl +++ b/src/parsers/nasm/gen_instr.pl @@ -810,6 +810,7 @@ sub output_yacc ($@) # ASSUMES: at least one previous action exists print GRAMMAR " | \Ugrp_$group\E error {\n"; print GRAMMAR " Error (_(\"expression syntax error\"));\n"; + print GRAMMAR " \$\$ = (bytecode *)NULL\n"; print GRAMMAR " }\n"; # terminate the rule -- 2.40.0