diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-09-07 01:54:59 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-09-07 01:54:59 +0200 |
commit | af1e84f54da32b5e8e917edc533c6efa6846acc2 (patch) | |
tree | 7f5a361e855356ae0a4900a1e17b78956436c648 /lib | |
parent | c033ff990acceac6d2095242fa17501e98555973 (diff) | |
download | Nim-af1e84f54da32b5e8e917edc533c6efa6846acc2.tar.gz |
Automatic deref for everything but pointers in asm/emit (#8891)
Fixes #7249
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim index 3a18a715c..a7e215168 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2741,12 +2741,12 @@ type when defined(JS): proc add*(x: var string, y: cstring) {.asmNoStackFrame.} = asm """ - var len = `x`[0].length-1; + var len = `x`.length-1; for (var i = 0; i < `y`.length; ++i) { - `x`[0][len] = `y`.charCodeAt(i); + `x`[len] = `y`.charCodeAt(i); ++len; } - `x`[0][len] = 0 + `x`[len] = 0 """ proc add*(x: var cstring, y: cstring) {.magic: "AppendStrStr".} |