diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-04-19 21:20:41 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-05-13 18:33:27 +0100 |
commit | 237919f1c337b2ac0b5b30d65964dd4bbb126457 (patch) | |
tree | fab62abc7c42eb54325ddddae1b73cf6bc32355c /apps/plugins | |
parent | 942b1dd072abc071a4024adc5198976878024bcb (diff) | |
download | rockbox-237919f1c337b2ac0b5b30d65964dd4bbb126457.tar.gz rockbox-237919f1c337b2ac0b5b30d65964dd4bbb126457.zip |
Fix invalid use of bool in doom
Settings code tries to cast the bool pointer to an int pointer
and then write through it, which makes AddressSanitizer whine.
Change-Id: I1d6162fc98144cd6b40444016b3b48ef02967324
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/doom/doomdef.c | 2 | ||||
-rw-r--r-- | apps/plugins/doom/doomdef.h | 2 | ||||
-rw-r--r-- | apps/plugins/doom/m_misc.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/doom/doomdef.c b/apps/plugins/doom/doomdef.c index 3facfbb299..6ae4bb6894 100644 --- a/apps/plugins/doom/doomdef.c +++ b/apps/plugins/doom/doomdef.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | // Location for any defines turned variables. | 35 | // Location for any defines turned variables. |
36 | #if(LCD_HEIGHT>LCD_WIDTH) | 36 | #if(LCD_HEIGHT>LCD_WIDTH) |
37 | bool rotate_screen=0; | 37 | int rotate_screen=0; |
38 | int SCREENWIDTH; | 38 | int SCREENWIDTH; |
39 | int SCREENHEIGHT; | 39 | int SCREENHEIGHT; |
40 | #endif | 40 | #endif |
diff --git a/apps/plugins/doom/doomdef.h b/apps/plugins/doom/doomdef.h index 05346cd443..43114f75ef 100644 --- a/apps/plugins/doom/doomdef.h +++ b/apps/plugins/doom/doomdef.h | |||
@@ -94,7 +94,7 @@ typedef unsigned Language_t; | |||
94 | // when multiple screen sizes are supported | 94 | // when multiple screen sizes are supported |
95 | 95 | ||
96 | #if(LCD_HEIGHT>LCD_WIDTH) | 96 | #if(LCD_HEIGHT>LCD_WIDTH) |
97 | extern bool rotate_screen; | 97 | extern int rotate_screen; |
98 | // proff 08/17/98: Changed for high-res | 98 | // proff 08/17/98: Changed for high-res |
99 | #define MAX_SCREENWIDTH LCD_HEIGHT | 99 | #define MAX_SCREENWIDTH LCD_HEIGHT |
100 | #define MAX_SCREENHEIGHT LCD_HEIGHT | 100 | #define MAX_SCREENHEIGHT LCD_HEIGHT |
diff --git a/apps/plugins/doom/m_misc.c b/apps/plugins/doom/m_misc.c index 586a4a1c2f..0318c9d741 100644 --- a/apps/plugins/doom/m_misc.c +++ b/apps/plugins/doom/m_misc.c | |||
@@ -308,7 +308,7 @@ default_t defaults[] = | |||
308 | {"screen_height",{&desired_screenheight, NULL},{200, NULL},200,1200, | 308 | {"screen_height",{&desired_screenheight, NULL},{200, NULL},200,1200, |
309 | def_int,ss_none, 0, 0},*/ | 309 | def_int,ss_none, 0, 0},*/ |
310 | #if(LCD_HEIGHT>LCD_WIDTH) | 310 | #if(LCD_HEIGHT>LCD_WIDTH) |
311 | {"rotate_screen",{(void *)&rotate_screen, NULL},{0, NULL},0,1, | 311 | {"rotate_screen",{&rotate_screen, NULL},{0, NULL},0,1, |
312 | def_bool,ss_none, 0, 0}, /* kwk - rotate the screen 90 degrees */ | 312 | def_bool,ss_none, 0, 0}, /* kwk - rotate the screen 90 degrees */ |
313 | #endif | 313 | #endif |
314 | {"fake_contrast",{&fake_contrast, NULL},{1, NULL},0,1, | 314 | {"fake_contrast",{&fake_contrast, NULL},{1, NULL},0,1, |