From fa67a6ae89e94fcbd1dbd7446320a7806b74ff21 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 20 Jul 2014 00:04:45 +0200 Subject: [PATCH] Fix error spotted by cppcheck --- src/support/lstrings.cpp | 2 +- status.21x | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index 7af8aae34e..d4b1ccf5a7 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -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("%")); } diff --git a/status.21x b/status.21x index 0522009016..3db8551e17 100644 --- a/status.21x +++ b/status.21x @@ -65,7 +65,9 @@ What's new * INTERNALS -- Improve thread-safety +- Improve thread-safety. + +- Fix potential bug spotted by cppcheck. * DOCUMENTATION AND LOCALIZATION -- 2.39.5