summary refs log tree commit diff stats
path: root/lib/pure/xmltree.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-26 17:21:52 +0200
committerAraq <rumpf_a@web.de>2011-06-26 17:21:52 +0200
commit990dc2d7152f09c413d8fd96d66484d79aec97c7 (patch)
treea267c16996c61292c78019ab56d1116d811fd0dc /lib/pure/xmltree.nim
parentdb0a4a9f86d167faccbd50f3f12f9de470e516b8 (diff)
downloadNim-990dc2d7152f09c413d8fd96d66484d79aec97c7.tar.gz
code gen bugfixes; marshal.nim implemented
Diffstat (limited to 'lib/pure/xmltree.nim')
-rwxr-xr-xlib/pure/xmltree.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pure/xmltree.nim b/lib/pure/xmltree.nim
index 41765b87a..7f6d5cff8 100755
--- a/lib/pure/xmltree.nim
+++ b/lib/pure/xmltree.nim
@@ -145,8 +145,7 @@ proc escape*(s: string): string =
   ##  ``&``          ``&amp;``
   ##  ``"``          ``&quot;``
   ## ------------    -------------------
-  result = newString(s.len)
-  setLen(result, 0)
+  result = newStringOfCap(s.len)
   addEscaped(result, s)
   
 proc addIndent(result: var string, indent: int) =