bugfix: c++ pattern #@ could index out of bounds
This commit is contained in:
parent
0032912d10
commit
1bbd13f729
1 changed files with 6 additions and 5 deletions
|
|
@ -339,6 +339,7 @@ proc genPatternCall(p: BProc; ri: PNode; pat: string; typ: PType): PRope =
|
||||||
let typ = skipTypes(ri.sons[0].typ, abstractInst)
|
let typ = skipTypes(ri.sons[0].typ, abstractInst)
|
||||||
if pat[i+1] == '+': result.app genArgNoParam(p, ri.sons[0])
|
if pat[i+1] == '+': result.app genArgNoParam(p, ri.sons[0])
|
||||||
result.app(~"(")
|
result.app(~"(")
|
||||||
|
if 1 < ri.len:
|
||||||
result.app genOtherArg(p, ri, 1, typ)
|
result.app genOtherArg(p, ri, 1, typ)
|
||||||
for k in j+1 .. < ri.len:
|
for k in j+1 .. < ri.len:
|
||||||
result.app(~", ")
|
result.app(~", ")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue