Commit graph

10 commits

Author SHA1 Message Date
AzaezelX b9c207765e uninitialized variables-gfx 2020-05-11 15:00:25 -05:00
Areloch ed14b6fced Removes bits of code and includes that are based on old 360, xbox and PS3 flags that are no longer needed. 2017-04-08 20:30:57 -05:00
Areloch bedc79aacb Merges in Monkey's fixes PR with a resolution for a conflict 2015-09-03 22:58:57 -05:00
Areloch 2002d74b78 Issue found with PVS-Studio:
Many instances of a function or expression being used repeatedly, which can lower performance.

Fixed it in these cases by creating on local var, reference or pointer that's used instead.
2015-07-13 22:51:17 -05:00
Nathan Bowhay ac0ba27753 Fixed degree symbol not displaying
Fixed bug with degree symbol not displaying correctly in torque thanks
to the forums:
http://www.garagegames.com/community/forums/viewthread/125190/1#comment-804996
2015-01-29 15:18:00 -08:00
Ben Payne a88339c219 Fix buffer overflows due to incorrect use of sizeof
A snippet of example code:

UTF16 pszFilter[1024];
...
convertUTF8toUTF16((UTF8 *)mData.mFilters, pszFilter, sizeof(pszFilter));

Since the conversion function is expecting the third parameter to be the
length in 16-bit characters, *not* bytes, this results in the function
writing outside the bounds of the output array.

To make this less likely to happen in the future (I hope), I've provided a
template function that infers the correct size of a static array, so it's
no longer necessary to pass the size in most cases. The sized function has
been renamed with an "N" suffix to hopefully encourage this use.

This bug was caught due to a warning from MSVC about stack corruption
occurring in codeBlock::exec(), after opening a file open dialog twice in
succession. After some hunting, I found that this was due to
FileDialog::Execute() passing incorrect buffer sizes to the conversion
function, which resulted in the function writing a null terminator into
some memory that happened to be in the stack frame of codeBlock::exec()!
2015-01-26 16:52:01 -05:00
Daniel Buckmaster a42c92391a Merge pull request #601 from BeamNG/rename_GFXTextureProfile_None
Rename enum GFXTextureProfile::None for avoid conficts on Linux.
2014-05-10 11:01:18 +10:00
LuisAntonRebollo 7f46383eb5 Rename enum GFXTextureProfile::None for avoid conficts on Linux. 2014-04-07 00:03:52 +02:00
Andy Maloney 396a7064dc Minor cleanups
- remove redundant conditional
 - remove unused vars
 - remove extra ags to printf
 - reduce scope of decl
2013-12-04 16:45:09 -05:00
DavidWyand-GG 7dbfe6994d Engine directory for ticket #1 2012-09-19 11:15:01 -04:00