microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.75k stars 5.39k forks source link

Zeros appear in error message in Programmer mode when using binary #2232

Open allamassal opened 2 months ago

allamassal commented 2 months ago

Describe the bug

When attempting to divide by zero in Programmer mode when set to binary, the error message appears as "00Cannot divide by zero". Trying 0 divided by 0 will give "000Result is undefined". In binary mode, leading zeros are added on the beginning according to the number of other characters in the display to make the number of characters divisible by 4. However, it also does this when there is an error on the display.

Steps To Reproduce

  1. Go into Programmer mode
  2. Switch to binary (BIN)
  3. Type any number divided by 0
  4. See error message with 0s at the beginning

Expected behavior

The error message would appear without any 0s at the beginning.

Screenshots

00Cannot divide by zero

Device and Application Information

Additional context

Requested Assignment

I'm just reporting this problem. I don't want to fix it.