diff --git a/src/include/units/format.h b/src/include/units/format.h index e74102b4..f6c37ef4 100644 --- a/src/include/units/format.h +++ b/src/include/units/format.h @@ -147,8 +147,8 @@ namespace units { // parse L to enable the locale-specific form if (*begin == 'L') { - handler.on_locale(); - ++begin; + handler.on_locale(); + ++begin; } if(begin != end && *begin != '}' && *begin != '%') { diff --git a/test/unit_test/runtime/fmt_test.cpp b/test/unit_test/runtime/fmt_test.cpp index df9de873..e29a29a3 100644 --- a/test/unit_test/runtime/fmt_test.cpp +++ b/test/unit_test/runtime/fmt_test.cpp @@ -1143,14 +1143,14 @@ TEST_CASE("localization with the 'L' specifier", "[text][fmt][localization]") { struct group2 : std::numpunct { - char do_thousands_sep() const override { return '_'; } - std::string do_grouping() const override { return "\2"; } + char do_thousands_sep() const override { return '_'; } + std::string do_grouping() const override { return "\2"; } }; struct group3 : std::numpunct { - char do_thousands_sep() const override { return '\''; } - std::string do_grouping() const override { return "\3"; } + char do_thousands_sep() const override { return '\''; } + std::string do_grouping() const override { return "\3"; } }; std::locale grp2{std::locale::classic(), new group2};