diff options
author | Araq <rumpf_a@web.de> | 2015-11-03 13:20:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-11-03 14:52:34 +0100 |
commit | 1dda0e4b84d2977c3a4c84d50ba656fcbc344314 (patch) | |
tree | 733e10a967f469ed9a748cdd9ba0c6325205ff4f /compiler/ccgexprs.nim | |
parent | 618d0bc2638f27ca61ac3362305bf08a46368447 (diff) | |
download | Nim-1dda0e4b84d2977c3a4c84d50ba656fcbc344314.tar.gz |
fixes a critical xlen codegen bug
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r-- | compiler/ccgexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index 388b6d047..c9ff9d4f0 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -1713,7 +1713,7 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) = genArrayLen(p, e, d, op) of mXLenStr, mXLenSeq: if not p.module.compileToCpp: - unaryExpr(p, e, d, "($1->Sup.len-1)") + unaryExpr(p, e, d, "($1->Sup.len)") else: unaryExpr(p, e, d, "$1->len") of mGCref: unaryStmt(p, e, d, "#nimGCref($1);$n") |