fixes a critical xlen codegen bug
This commit is contained in:
parent
618d0bc263
commit
1dda0e4b84
1 changed files with 1 additions and 1 deletions
|
|
@ -1713,7 +1713,7 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
|
||||||
genArrayLen(p, e, d, op)
|
genArrayLen(p, e, d, op)
|
||||||
of mXLenStr, mXLenSeq:
|
of mXLenStr, mXLenSeq:
|
||||||
if not p.module.compileToCpp:
|
if not p.module.compileToCpp:
|
||||||
unaryExpr(p, e, d, "($1->Sup.len-1)")
|
unaryExpr(p, e, d, "($1->Sup.len)")
|
||||||
else:
|
else:
|
||||||
unaryExpr(p, e, d, "$1->len")
|
unaryExpr(p, e, d, "$1->len")
|
||||||
of mGCref: unaryStmt(p, e, d, "#nimGCref($1);$n")
|
of mGCref: unaryStmt(p, e, d, "#nimGCref($1);$n")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue