From 69d1606ac97547896a0ede8dee5e59fc4a5de7c2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 5 Sep 2012 19:29:29 +0000 Subject: Fixed silly bug involving juxtaposed replacement tokens in Bu::String::FormatProxy substitutions. --- src/stable/string.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/stable') diff --git a/src/stable/string.cpp b/src/stable/string.cpp index 621da93..4cef6b1 100644 --- a/src/stable/string.cpp +++ b/src/stable/string.cpp @@ -1252,7 +1252,7 @@ Bu::String::FormatProxy::operator Bu::String() const } Bu::MemBuf mbOut; Bu::Formatter f( mbOut ); - for( String::const_iterator s = rFmt.begin(); s; s++ ) + for( String::const_iterator s = rFmt.begin(); s; ) { if( *s == '%' ) { @@ -1278,14 +1278,14 @@ Bu::String::FormatProxy::operator Bu::String() const } f << (*aArg[iIndex]).format << (*aArg[iIndex]).value; - if( s ) - f << *s; + continue; } } else { f << *s; } + s++; } delete[] aArg; -- cgit v1.2.3