microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.58k stars 6.56k forks source link

"Divide by zero" trying to by divide hex number in calculator #36032

Open dkaszews opened 1 day ago

dkaszews commented 1 day ago

Microsoft PowerToys version

0.86.0

Installation method

WinGet

Running as admin

No

Area(s) with issue?

PowerToys Run

Steps to reproduce

Trying to divide by any hex number is not recognized as a calculation, forcing with= prefix incorrectly shows "calculation contains division by zero". The same issue is for binary prefix. Likely some input validator checking for / 0 does not understand base prefixes.

✔️ Expected Behavior

> 0x100 / 16
🧮 16
> 0x100 / 0x10
🧮 16
> = 0x100 / 0x10
🧮 16

❌ Actual Behavior

> 0x100 / 16
🧮 16
> 0x100 / 0x10
🌐 0x100 / 0x10
> = 0x100 / 0x10
🧮 Failed to calculate the input, calculation contains division by zero 

Other Software

No response