summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.cc
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-29 06:43:38 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-29 06:43:38 +0000
commit3597990374dafd842c43e2d2508fd82efc33ae45 (patch)
treeaeae332095dc07ee42463e669e22584242b03b33 /crawl-ref/source/format.cc
parent8424d3d334221dbd5eea36b26daf3b475213445a (diff)
downloadcrawl-ref-3597990374dafd842c43e2d2508fd82efc33ae45.tar.gz
crawl-ref-3597990374dafd842c43e2d2508fd82efc33ae45.zip
Fix 1927562, which was introduced by a code cleanup.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3933 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/format.cc')
-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;