From f17de0b13ac0e683e3a100eb0c3ea5ff23ff7ce2 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 1 Aug 2014 02:06:07 +0200 Subject: [PATCH] Fix typo in mHigh --- compiler/jsgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 6687e2e8ec..662ee837b6 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -1321,7 +1321,7 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) = of mLengthSeq, mLengthOpenArray, mLengthArray: unaryExpr(p, n, r, "", "$1.length") of mHigh: - if skipTypes(n.sons[0].typ, abstractVar).kind == tyString: + if skipTypes(n.sons[1].typ, abstractVar).kind == tyString: unaryExpr(p, n, r, "", "($1.length-2)") else: unaryExpr(p, n, r, "", "($1.length-1)")