diff options
author | Araq <rumpf_a@web.de> | 2014-12-17 01:43:22 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-12-17 01:43:22 +0100 |
commit | 02cc9633ebe23d2b9c99254fad8b6c6abcb05e1e (patch) | |
tree | a52026a9485e621ae0d85baf3cd9cc0c2f670d95 | |
parent | e9619d727894637ba4ef2d84473c5a06a17a8fee (diff) | |
download | Nim-02cc9633ebe23d2b9c99254fad8b6c6abcb05e1e.tar.gz |
fixes #1730
-rw-r--r-- | lib/pure/subexes.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/subexes.nim b/lib/pure/subexes.nim index c87823926..adcfdd288 100644 --- a/lib/pure/subexes.nim +++ b/lib/pure/subexes.nim @@ -38,7 +38,11 @@ proc raiseInvalidFormat(msg: string) {.noinline.} = type TFormatParser = object {.pure, final.} - f: cstring + when defined(js): + f: string # we rely on the '\0' terminator + # which JS's native string doesn't have + else: + f: cstring num, i, lineLen: int template call(x: stmt) {.immediate.} = |