diff --git a/rapidxml.hpp b/rapidxml.hpp index 3066c94..4befaaf 100644 --- a/rapidxml.hpp +++ b/rapidxml.hpp @@ -1811,9 +1811,9 @@ namespace rapidxml { static unsigned char test(Ch ch) { - if (Quote == Ch('\'')) + if (ch < 256 && Quote == Ch('\'')) return internal::lookup_tables<0>::lookup_attribute_data_1[static_cast(ch)]; - if (Quote == Ch('\"')) + if (ch < 256 && Quote == Ch('\"')) return internal::lookup_tables<0>::lookup_attribute_data_2[static_cast(ch)]; return 0; // Should never be executed, to avoid warnings on Comeau } @@ -1825,9 +1825,9 @@ namespace rapidxml { static unsigned char test(Ch ch) { - if (Quote == Ch('\'')) + if (ch < 256 && Quote == Ch('\'')) return internal::lookup_tables<0>::lookup_attribute_data_1_pure[static_cast(ch)]; - if (Quote == Ch('\"')) + if (ch < 256 && Quote == Ch('\"')) return internal::lookup_tables<0>::lookup_attribute_data_2_pure[static_cast(ch)]; return 0; // Should never be executed, to avoid warnings on Comeau }