Fix memory search bug with host-endian VMAs

This commit is contained in:
Ilari Liusvaara 2013-02-25 19:19:17 +02:00
parent db28464d61
commit 4084b1c16b

View file

@ -138,7 +138,7 @@ struct search_value_helper
return false; return false;
value_type v1 = 0; value_type v1 = 0;
value_type v2 = 0; value_type v2 = 0;
if((!endian || endian == memory_space::get_system_endian()) && memory_space::can_read_unaligned()) { if(!endian || (endian == memory_space::get_system_endian() && memory_space::can_read_unaligned())) {
v1 = *reinterpret_cast<const value_type*>(oldv); v1 = *reinterpret_cast<const value_type*>(oldv);
v2 = *reinterpret_cast<const value_type*>(newv); v2 = *reinterpret_cast<const value_type*>(newv);
} else if(endian < 0) } else if(endian < 0)