summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-08-01 02:09:09 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-08-01 02:09:09 +0200
commitf43ec61568b42eb540fc5ee0f3e92ad12c7138b4 (patch)
tree468c000ec36428766a3866ec610f07c3d52c0878 /compiler
parent29277f8acfad577ffbf3dbe431abe73f48fc7b46 (diff)
parentf17de0b13ac0e683e3a100eb0c3ea5ff23ff7ce2 (diff)
downloadNim-f43ec61568b42eb540fc5ee0f3e92ad12c7138b4.tar.gz
Merge pull request #1437 from def-/fix-#1291
Fix typo in mHigh
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 8fa9838ee..96d8b3d11 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)")