summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/format.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index 3a0d0887ba..12cb5ba94b 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -345,15 +345,13 @@ std::string formatted_string::to_colour_string() const
{
if (ops[i] == FSOP_TEXT)
{
- st += ops[i].text;
-
// gotta double up those '<' chars ...
unsigned int start = st.size();
- unsigned int left_angle;
-
+ st += ops[i].text;
+
while (true)
{
- left_angle = st.find('<', start);
+ const unsigned int left_angle = st.find('<', start);
if (left_angle == std::string::npos)
break;