Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Constant integer corruption with VS2010

$
0
0
Hello! After upgrading to r2418, we again found a bug related to constant handling, it seems. Test case: const int64 a = 4287660160; print(formatInt(a, "0h", 8)); // ffd08080 (WRONG) int64 a = 4287660160; print(formatInt(a, "0h", 8)); // ffd08080 (WRONG) const int64 a = 4287660160.0f; print(formatInt(a, "0h", 8)); // ffd08000 (WRONG) int64 a = 4287660160.0f; print(formatInt(a, "0h", 8)); // ff908000 (CORRECT) I cannot reproduce the issue with a linux build with gcc 4.2 nor gcc 7. It seems to happen exclusively on VS2010. This broke our PNG map loading scripts because these compare hex literals against colors. I think we didn't do anything wrong on our side? I hope it's not too hard to fix.

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>