mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-03 15:39:46 +01:00
Don't trigger UB with autotile type none
This commit is contained in:
parent
a37cb4aa5f
commit
17e0d6c330
1 changed files with 7 additions and 0 deletions
|
@ -202,6 +202,13 @@ editorclass::editorclass(void)
|
||||||
outside_vec.assign(outside, outside + SDL_arraysize(outside));
|
outside_vec.assign(outside, outside + SDL_arraysize(outside));
|
||||||
autotile_types["outside"] = outside_vec;
|
autotile_types["outside"] = outside_vec;
|
||||||
|
|
||||||
|
// Everything gets initialized to 0 by default
|
||||||
|
static const short none[256] = {};
|
||||||
|
|
||||||
|
std::vector<int> none_vec;
|
||||||
|
none_vec.assign(none, none + SDL_arraysize(none));
|
||||||
|
autotile_types["none"] = none_vec;
|
||||||
|
|
||||||
SDL_zeroa(tileset_min_colour);
|
SDL_zeroa(tileset_min_colour);
|
||||||
SDL_zeroa(tileset_max_colour);
|
SDL_zeroa(tileset_max_colour);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue