mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 17:24:02 +00:00
Merge pull request #10577 from zielmicha/fix-10568
Fixes #10568: Fix null pointer dereference in address computation for incrSeqV3.
This commit is contained in:
@@ -1123,7 +1123,7 @@ proc genSeqElemAppend(p: BProc, e: PNode, d: var TLoc) =
|
||||
# seq = (typeof seq) incrSeq(&seq->Sup, sizeof(x));
|
||||
# seq->data[seq->len-1] = x;
|
||||
let seqAppendPattern = if not p.module.compileToCpp:
|
||||
"($2) #incrSeqV3(&($1)->Sup, $3)"
|
||||
"($2) #incrSeqV3((TGenericSeq*)($1), $3)"
|
||||
else:
|
||||
"($2) #incrSeqV3($1, $3)"
|
||||
var a, b, dest, tmpL, call: TLoc
|
||||
|
||||
Reference in New Issue
Block a user