UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.14k stars 217 forks source link

Ternaries decompiling weirdly #725

Open Yule42 opened 2 years ago

Yule42 commented 2 years ago

Ternaries do not compile correctly when combined with +=. Example: global.msg[0] += ((((("& But " + global.monstername[myself]) + " wasn't ") + (global.flag[22] == 2 ? "YELLOW" : (global.flag[22] == 0 ? "SPAREABLE" : "PINK"))) + ".../%%")) turns into global.msg[_temp_local_var_12] = (global.msg[0] + (((("& But " + global.monstername[myself]) + " wasn't ") + (global.flag[22] == 2 ? "YELLOW" : (global.flag[22] == 0 ? "SPAREABLE" : "PINK"))) + ".../%%"))

Grossley commented 2 years ago

This is most likely a decompiler issue, not a compiler issue. This will be investigated.