mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Fix strict aliasing violations
Compiler only guarantees proper accesses to variables when using variable's native type or `char` (i.e. single byte type) [1]. This commit fixes violations of this rule. In most cases changing code to a simple cast was enough, some required a bit deeper modifications. This fixes #2596. [1] http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
rct_window* g_window_list = RCT2_ADDRESS(RCT2_ADDRESS_WINDOW_LIST, rct_window);
|
||||
|
||||
uint8 TextInputDescriptionArgs[8];
|
||||
uint16 TextInputDescriptionArgs[4];
|
||||
widget_identifier gCurrentTextBox = { { 255, 0 }, 0 };
|
||||
char gTextBoxInput[512] = { 0 };
|
||||
int gMaxTextBoxInputLength = 0;
|
||||
|
||||
Reference in New Issue
Block a user