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
|
def i, n
|
||||||
0 =i
|
0 =i
|
||||||
output:len =n
|
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 } {
|
1 while { i n lt } {
|
||||||
input:get<i> output:get<i> check-match and
|
input:get<i> output:get<i> check-match and
|
||||||
i ++ =i
|
i ++ =i
|
||||||
|
@ -674,7 +674,7 @@ func match-unchecked { | with input output ;
|
||||||
def i, n
|
def i, n
|
||||||
0 =i
|
0 =i
|
||||||
output:len =n
|
output:len =n
|
||||||
input:len n eq not if { 2 stop }
|
input:len n eq not if { 3 stop }
|
||||||
while { i n lt } {
|
while { i n lt } {
|
||||||
input:get<i> output:get<i> match-unchecked
|
input:get<i> output:get<i> match-unchecked
|
||||||
i ++ =i
|
i ++ =i
|
||||||
|
@ -694,7 +694,7 @@ func match { bool | with input output ;
|
||||||
def i, n
|
def i, n
|
||||||
0 =i
|
0 =i
|
||||||
output:len =n
|
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 } {
|
1 while { i n lt } {
|
||||||
input:get<i> output:get<i> check-match and
|
input:get<i> output:get<i> check-match and
|
||||||
i ++ =i
|
i ++ =i
|
||||||
|
|
Loading…
Add table
Reference in a new issue