fix match causing stack garbage when array lengths mismatch
This commit is contained in:
parent
fd0aed81fd
commit
92858f6baf
1 changed files with 3 additions and 3 deletions
|
@ -655,7 +655,7 @@ func check-match { bool | with input output ;
|
|||
def i, n
|
||||
0 =i
|
||||
output:len =n
|
||||
input:len n eq not if { 0 2 stop }
|
||||
input:len n eq not if { 0 3 stop }
|
||||
1 while { i n lt } {
|
||||
input:get<i> output:get<i> check-match and
|
||||
i ++ =i
|
||||
|
@ -674,7 +674,7 @@ func match-unchecked { | with input output ;
|
|||
def i, n
|
||||
0 =i
|
||||
output:len =n
|
||||
input:len n eq not if { 2 stop }
|
||||
input:len n eq not if { 3 stop }
|
||||
while { i n lt } {
|
||||
input:get<i> output:get<i> match-unchecked
|
||||
i ++ =i
|
||||
|
@ -694,7 +694,7 @@ func match { bool | with input output ;
|
|||
def i, n
|
||||
0 =i
|
||||
output:len =n
|
||||
input:len n eq not if { 0 2 stop }
|
||||
input:len n eq not if { 0 3 stop }
|
||||
1 while { i n lt } {
|
||||
input:get<i> output:get<i> check-match and
|
||||
i ++ =i
|
||||
|
|
Loading…
Add table
Reference in a new issue