bvschaik / julius

An open source re-implementation of Caesar III
GNU Affero General Public License v3.0
2.85k stars 317 forks source link

Use -fsanitize=undefined when compiling with Clang. #667

Closed PrettyFlower closed 1 year ago

PrettyFlower commented 1 year ago

I tried upgrading to VS 2022 and it stopped reporting every single for loop as an error, so I propose we go ahead and set this flag by default when in Debug mode. Might want to do it for GCC as well.

crudelios commented 1 year ago

Just a question as I haven't tested with the option on yet: if there's an out of bounds with this enabled, does the game immediately crash?

PrettyFlower commented 1 year ago

Not with this setup (tho you can configure it to work that way).

crudelios commented 1 year ago

Okay nice. Then I guess it's OK to add this option.