inwc3 / w3-bug-tracker

Bug tracker for Warcraft 3
0 stars 0 forks source link

World Editor improperly handles large entered integer values #22

Open Luashine opened 5 months ago

Luashine commented 5 months ago

External URLs

No response

Game Versions

1.36.2.21230

Summary

When you try to set an int variable to a large value, WE appears to randomly change the lowest byte.

Expected

Either an error message or "correctly" truncate the entered number to 32 bits.

Expected number: 481404547

Actual

Actual saved number: 48140544. This value is correctly propagated to the code.

Reproduction steps

  1. Go to GUI trigger
  2. Create an int variable or some trigger action where you'd enter an integer
  3. Paste the number "481404547"
  4. Click OK to save
  5. Before the window closes, you can see the number is silently changed to 48140544.

Different values may affect the resulting number differently. Because the value is too big you cannot change it with arrow buttons of the input field.

Workaround

Custom code or directly editing war3map.j

Screenshots, test maps, other material

-