From Bjorn: The bool variable can be located at an odd address. Trying to read an integer from an odd address will result in a CPUAdrErr exception. It would probably be better to cast oldval to a bool instead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3745 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b010ba2f7f
commit
df40c144a9
1 changed files with 1 additions and 1 deletions
|
@ -1679,7 +1679,7 @@ bool set_option(char* string, void* variable, enum optiontype type,
|
||||||
case BUTTON_MENU:
|
case BUTTON_MENU:
|
||||||
#endif
|
#endif
|
||||||
if (((type==INT) && (*intvar != oldval)) ||
|
if (((type==INT) && (*intvar != oldval)) ||
|
||||||
((type==BOOL) && ((int)*boolvar != oldval))) {
|
((type==BOOL) && (*boolvar != (bool)oldval))) {
|
||||||
if (type==INT)
|
if (type==INT)
|
||||||
*intvar=oldval;
|
*intvar=oldval;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue