From 1dda0e4b84d2977c3a4c84d50ba656fcbc344314 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 3 Nov 2015 13:20:23 +0100 Subject: fixes a critical xlen codegen bug --- compiler/ccgexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') 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") -- cgit 1.4.1-2-gfad0 e='h' onchange='this.form.submit();'> Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log tree commit diff stats
path: root/cpp/.traces/string_literal_and_comment
blob: 9ad1bff7d9d593a16b930e817f1de143dc7ddb44 (plain) (blame)
1
2
3