]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/std-string.cc
Translation build: stop building general.texi in the wrong place.
[lilypond.git] / flower / std-string.cc
index 285c51883c5d1fc0a7727816a3e99ab0e5da2e03..53fd548bfa340f422fc6cce872f6ed590ceb967f 100644 (file)
@@ -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;
 }