Skip to content

Commit

Permalink
Special-case si_string(0) so we don't get 0.0 yocto-whatever
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 committed Jun 19, 2014
1 parent ebaea58 commit bde0a3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/serialization/string_utils.cpp
Expand Up @@ -564,7 +564,11 @@ std::string si_string(double input, bool base2, std::string unit) {

strings9 prefixes;
strings9::const_iterator prefix;
if (input < 1.0) {
if (input == 0.0) {
strings9 tmp = { { "","","","","","","","","" } };
prefixes = tmp;
prefix = prefixes.begin();
} else if (input < 1.0) {
strings9 tmp = { {
"",
_("prefix_milli^m"),
Expand Down

0 comments on commit bde0a3a

Please sign in to comment.