]> git.lyx.org Git - features.git/commitdiff
Fix error spotted by cppcheck
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 19 Jul 2014 22:04:45 +0000 (00:04 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 19 Jul 2014 22:04:45 +0000 (00:04 +0200)
src/support/lstrings.cpp
status.21x

index 7af8aae34e9a50b52b2aa716148b499394a87dfe..d4b1ccf5a79976f247db0ccc05886af5d75ffcf5 100644 (file)
@@ -1407,7 +1407,7 @@ docstring bformat(docstring const & fmt, char const * arg1, docstring arg2)
        LATTEST(contains(fmt, from_ascii("%1$s")));
        LATTEST(contains(fmt, from_ascii("%2$s")));
        docstring str = subst(fmt, from_ascii("%1$s"), from_ascii(arg1));
-       str = subst(fmt, from_ascii("%2$s"), arg2);
+       str = subst(str, from_ascii("%2$s"), arg2);
        return subst(str, from_ascii("%%"), from_ascii("%"));
 }
 
index 05220090166d732df45d441b56a94e89a27975a3..3db8551e175a5c6d197ceda8329c225643da5b4f 100644 (file)
@@ -65,7 +65,9 @@ What's new
 
 * INTERNALS
 
-- Improve thread-safety
+- Improve thread-safety.
+
+- Fix potential bug spotted by cppcheck.
 
 
 * DOCUMENTATION AND LOCALIZATION