You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty weird error and I can't fully tell what the intention in this section of code is, but
units::measurement_from_string("0.2") currently yields zero.
The reason is in the following lines in units.cpp. I don't know why 2 and 3 are a special case here, but I assume there is a case '.': missing in front of the break?
auto eit = unit_string.end() - 1;
if (*(eit) == '2' || *(eit) == '3') {
if ((*(eit - 1) == '-' || *(eit - 1) == '+') &&
unit_string.size() >= 3) {
--eit;
}
if (!isDigitCharacter(*(eit - 1))) {
switch (*(eit - 1)) {
case '^':
case 'e':
case 'E':
case '/':
case '+':
case '-':
break;
case '*':
*(eit - 1) = '^';
break;
default:
if (eit[0] != '+') {
unit_string.insert(eit, '^');
} else {
*eit = '^';
}
break;
}
}
}
}```
The text was updated successfully, but these errors were encountered:
Been on vacation for a couple weeks. Thanks for this It will be fixed shortly. The intention of that section of the code is to catch things like m3 which is often used for meter^3. Missed the edge cases of numerical values ending in .3 or .2
Pretty weird error and I can't fully tell what the intention in this section of code is, but
units::measurement_from_string("0.2")
currently yields zero.The reason is in the following lines in units.cpp. I don't know why 2 and 3 are a special case here, but I assume there is a
case '.':
missing in front of the break?The text was updated successfully, but these errors were encountered: