Commit 71643b2f authored by Russ Cox's avatar Russ Cox

runtime: fix string optimization

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6354048
parent 8744d35d
......@@ -155,7 +155,9 @@ concatstring(int32 n, String *s)
out = s[i];
}
}
if(count <= 1) // zero or one non-empty string in concatenation
if(count == 0)
return runtime·emptystring;
if(count == 1) // zero or one non-empty string in concatenation
return out;
out = gostringsize(l);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment