Skip to content

Commit e00bafe

Browse files
committed
Avoid PMCNULL error when converting non-existent hash element to string.
1 parent 9a65d79 commit e00bafe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/HLL/Grammar.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,16 +770,22 @@ An operator precedence parser.
770770

771771
op_list:
772772
.local string sym
773+
sym = ''
773774
$P0 = opOPER['sym']
775+
if null $P0 goto op_list_1
774776
sym = $P0
777+
op_list_1:
775778
arg = pop termstack
776779
unshift op, arg
777780
op_sym_loop:
778781
unless opstack goto op_sym_done
782+
$S0 = ''
779783
$P0 = opstack[-1]
780784
$P0 = $P0['OPER']
781785
$P0 = $P0['sym']
786+
if null $P0 goto op_sym_1
782787
$S0 = $P0
788+
op_sym_1:
783789
if sym != $S0 goto op_sym_done
784790
arg = pop termstack
785791
unshift op, arg

0 commit comments

Comments
 (0)