[kcalc] [Bug 500784] kcalc allows to input multiple decimal points
Gabriel Barrantes
bugzilla_noreply at kde.org
Sat Mar 1 14:58:21 GMT 2025
https://bugs.kde.org/show_bug.cgi?id=500784
--- Comment #5 from Gabriel Barrantes <gabriel.barrantes.dev at outlook.com> ---
(In reply to Imron from comment #3)
> Thank you. I will work on this bug.
Hey, (maintainer here)
so, what is probably happening is that inputs of the form .d+ (d a digit) are
actually valid (no leading zero is required), and the parser "accepts" two
consecutive numbers just fine as long it can determine where one finish and the
next starts, so probably 123.1.1.1 gets parsed as 123.1|0.1|0.1 and the
calculator assumes a multiplication operation bewteen the numbers yielding
123.1*0.1*0.1
to fix this a change in the regex to parse must be introduced, not allowing the
last character to be a decimal point (. or ,), open a MR if you want some
guidance.
The parser has become kinda complex to handle all such cases and I think some
rework is need it before this but this can be merged no problem as it is now.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the kde-mac
mailing list