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,7 +339,8 @@ proc genPatternCall(p: BProc; ri: PNode; pat: string; typ: PType): PRope =
|
|||
let typ = skipTypes(ri.sons[0].typ, abstractInst)
|
||||
if pat[i+1] == '+': result.app genArgNoParam(p, ri.sons[0])
|
||||
result.app(~"(")
|
||||
result.app genOtherArg(p, ri, 1, typ)
|
||||
if 1 < ri.len:
|
||||
result.app genOtherArg(p, ri, 1, typ)
|
||||
for k in j+1 .. < ri.len:
|
||||
result.app(~", ")
|
||||
result.app genOtherArg(p, ri, k, typ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue