From bc50795d9c43a54db90030dd03f7b3460ccd2df9 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 10 Apr 2019 15:49:04 +0200 Subject: enable most tnewruntime_strutils tests --- lib/core/strs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/core/strs.nim b/lib/core/strs.nim index 49dc59508..b00042dc9 100644 --- a/lib/core/strs.nim +++ b/lib/core/strs.nim @@ -86,7 +86,7 @@ proc resize(old: int): int {.inline.} = else: result = old * 3 div 2 # for large arrays * 3/2 is better proc prepareAdd(s: var NimStringV2; addlen: int) {.compilerRtl.} = - if isLiteral(s): + if isLiteral(s) and addlen > 0: let oldP = s.p # can't mutate a literal, so we need a fresh copy here: let allocator = getLocalAllocator() -- cgit 1.4.1-2-gfad0 3e7'>this commit This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log tree commit diff stats
path: root/tools/start.bat
blob: 8e345998cd70d8b6b563b1bc20cce55d5e78e975 (plain) (blame)
1
2
3
4
5
6
7
8
9