X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Fstd-string.cc;h=53fd548bfa340f422fc6cce872f6ed590ceb967f;hb=02ad0bdf425c1a840301a5a9f433f0f1758e8f10;hp=ec5ddffbd4bd05f013b666004938e7350a50ec15;hpb=a6a4b3fc2009f17a1a48cca0c11bfd3f38645937;p=lilypond.git diff --git a/flower/std-string.cc b/flower/std-string.cc index ec5ddffbd4..53fd548bfa 100644 --- a/flower/std-string.cc +++ b/flower/std-string.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2006--2008 Jan Nieuwenhuizen + (c) 2006--2009 Jan Nieuwenhuizen */ #include "std-string.hh" @@ -80,7 +80,8 @@ string & replace_all (string *str, string const &find, string const &replace) { ssize len = find.length (); - for (ssize i = str->find (find); i != NPOS; i = str->find (find, i + len)) + ssize replen = replace.length (); + for (ssize i = str->find (find); i != NPOS; i = str->find (find, i + replen)) *str = str->replace (i, len, replace); return *str; }