https://bugs.documentfoundation.org/show_bug.cgi?id=139306
--- Comment #13 from Amin Irgaliev <[email protected]> --- (In reply to Mike Kaganski from comment #12) > (In reply to Amin Irgaliev from comment #11) > > I mean, that in comment 9, you did not provide the whole set of possible > situations, and thus, did not prove that there will never be a too large > nDecPlaces. Namely, in your list, I do not see, what can nDecPlaces be, when > e.g. eFormat == rtl_math_StringFormat_F (as in #2), but aParts.exponent < 0 > or fValue >= 0x1p53 Yes, indeed, there is no such check in the code now. We considered what cases there might be, added additional checks and set clamp to [-20; 20]. But we removed line with default clamping after all checks. 1) else if (eFormat == rtl_math_StringFormat_E || eFormat == rtl_math_StringFormat_E1 || eFormat == rtl_math_StringFormat_E2 || eFormat == rtl_math_StringFormat_FORCE_EQUAL_SIZE) { nDecPlaces = std::clamp<sal_Int32>(nDecPlaces, -20, 20); } after if ((fValue >= fB4) && eFormat != rtl_math_StringFormat_F) 2) if (eFormat == rtl_math_StringFormat_F && (aParts.exponent < 0 || fValue >= 0x1p53)) { nDecPlaces = std::clamp<sal_Int32>(nDecPlaces, -20, 20); } -- You are receiving this mail because: You are the assignee for the bug.
