View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031725 | Runner | Windows (YYC) | Public | 2020-06-19 19:50 | 2020-07-13 14:57 |
Reporter | YellowAfterlife | Assigned To | Russell Kay | ||
Priority | Low | Severity | C - General | Reproducibility | 100% |
Status | Resolved | Resolution | Fixed | ||
Platform | Windows | OS | Windows 10 Pro | OS Version | >=18362 |
Product Version | 2.2.5 | ||||
Target Version | 2.3.0 | Fixed in Version | 2.3.0 | ||
Summary | 0031725: YYC: Arguments now being passed by-reference introduces unexpected behaviour | ||||
Description | GML: function destroy_squirrel(squirrel) { show_debug_message("DESTROYING SQUIRREL "+string(squirrel)); if (global.event_squirrel == squirrel) global.event_squirrel = -1; show_debug_message("DELETING SQUIRREL "+string(squirrel)); } function scr_a_bug(){ global.event_squirrel = 0; destroy_squirrel(global.event_squirrel); } VM output: DESTROYING SQUIRREL 0 DELETING SQUIRREL 0 YYC output: DESTROYING SQUIRREL 0 DELETING SQUIRREL -1 As you can see, since the global is passed by-ref rather than by-value, YYC experiences seemingly impossible behaviour with argument value not matching what was passed after modifying the original value. | ||||
Additional Information | I'm not actually sure how this is best approached without reverting the optimization. Happens in 2.2.5 too. | ||||
Tags | yyc | ||||
1.4 Found In | |||||
2.x Runtime Found In | 9.9.1.1824 | ||||
2.x Runtime Verified In | |||||