Fix error spotted by cppcheck

This commit is contained in:
Jean-Marc Lasgouttes 2014-07-20 00:04:45 +02:00
parent 275c6dabe6
commit fa67a6ae89
2 changed files with 4 additions and 2 deletions

View 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("%1$s")));
LATTEST(contains(fmt, from_ascii("%2$s"))); LATTEST(contains(fmt, from_ascii("%2$s")));
docstring str = subst(fmt, from_ascii("%1$s"), from_ascii(arg1)); 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("%")); return subst(str, from_ascii("%%"), from_ascii("%"));
} }

View File

@ -65,7 +65,9 @@ What's new
* INTERNALS * INTERNALS
- Improve thread-safety - Improve thread-safety.
- Fix potential bug spotted by cppcheck.
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION