diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-03-06 02:04:22 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-03-06 02:04:22 +0100 |
commit | 83592af8ed06884fccfe9702c36819b727715936 (patch) | |
tree | fcd40759d1bfcdce2044ab62469e2a20921d9f66 /lib/system | |
parent | 01055d572abd2137dec18b43ee02692cb794a948 (diff) | |
parent | 8c1dd215ac4f47657db5c26f04c9d2b37aa9980d (diff) | |
download | Nim-83592af8ed06884fccfe9702c36819b727715936.tar.gz |
Merge pull request #3941 from oderwat/hara-php-mnewString-fix
Fix for PHP mnewString()
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/jssys.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/system/jssys.nim b/lib/system/jssys.nim index c96f2f958..1b98883b9 100644 --- a/lib/system/jssys.nim +++ b/lib/system/jssys.nim @@ -263,9 +263,7 @@ proc toJSStr(s: string): cstring {.asmNoStackFrame, compilerproc.} = proc mnewString(len: int): string {.asmNoStackFrame, compilerproc.} = when defined(nimphp): asm """ - $result = array(); - for($i = 0; $i < `len`; $i++) $result[] = chr(0); - return $result; + return str_repeat(chr(0),`len`); """ else: asm """ |