Orvid / Champollion

A PEX to Papyrus Decompiler for Skyrim, Fallout 4 and Starfield
GNU Lesser General Public License v3.0
107 stars 20 forks source link

Precedence while casting bug #3

Closed ArcaneTourist closed 1 year ago

ArcaneTourist commented 3 years ago

Apparent bug.

Compiling the following statement: Float x = 1000.00 / (y as Float 60.0) And then de-compiling yields source without the parentheses: Float x = 1000.00 / y as Float 60.0

So, if y==6, you get 10,000 instead of 2.7778

I haven't tested to see if this just happens when converting ints to floats or if it's wrong for every divide/multiply. This was seen with the executable from the Nexus Skyrim mod page https://www.nexusmods.com/skyrim/mods/35307.