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:
Hardeep Sidhu 2003-06-11 15:36:04 +00:00
parent b010ba2f7f
commit df40c144a9

View file

@ -1679,7 +1679,7 @@ bool set_option(char* string, void* variable, enum optiontype type,
case BUTTON_MENU:
#endif
if (((type==INT) && (*intvar != oldval)) ||
((type==BOOL) && ((int)*boolvar != oldval))) {
((type==BOOL) && (*boolvar != (bool)oldval))) {
if (type==INT)
*intvar=oldval;
else