summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2017-08-07 18:21:21 +0200
committerArne Döring <arne.doering@gmx.net>2017-08-07 18:21:21 +0200
commit54808ab12fcbf8cc253129ed03f560fc6dd2648e (patch)
treef87094474da3df24bd94b393dcbe838290ed13a5 /lib
parent3bf1f019a76c6fee5553a7daf7d984cfd39cfb04 (diff)
downloadNim-54808ab12fcbf8cc253129ed03f560fc6dd2648e.tar.gz
don't filter '\0' characters in string generation
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 0bc0a0dbf..d2bdeae0e 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2427,12 +2427,7 @@ proc collectionToString[T](x: T, prefix, separator, suffix: string): string =
         result.add($value)
     # prevent temporary string allocation
     elif compiles(result.add(value)):
-      # don't insert '\0' characters into the result string
-      when value is char:
-        if value != '\0':
-          result.add(value)
-      else:
-        result.add(value)
+      result.add(value)
     else:
       result.add($value)