summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
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)