cleolibrary / CLEO5

CLEO 5 for GTA San Andreas
https://cleo.li
MIT License
57 stars 6 forks source link

Allowed more args in cleo_return than caller expected in legacy modes. #176

Closed MiranDMC closed 3 months ago

MiranDMC commented 3 months ago

image Fixes error occurring in Junior's Tuning Mod In old Cleo target variables of not provided return values were just unmodified after call.

x87 commented 3 months ago

As I said some time ago, it might be a good idea to disable all validation in legacy mode by default, rather than constantly fine tuning it

MiranDMC commented 3 months ago

As I said some time ago, it might be a good idea to disable all validation in legacy mode by default, rather than constantly fine tuning it

Yes, and it is generally done that way. All warnings are silenced globally by legacy modes. Some other cases produce crashes or undefined behaviors (like returning more that expected values in 0AB2), and these critical errors need to be checked and handled with error message.

Changes scope of this PR shows it was meant to work that way.

There is for sure many obscure scenarios nobody even think about yet and those will come out in testing.