Skip to content

Commit 27b6832

Browse files
authored
Clarify operator precedence in declaration check (#731)
This makes existing precedence more explicit via grouping, with no behavior/codegen changes.
1 parent c8033ce commit 27b6832

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/pugixml.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@ PUGI_IMPL_NS_BEGIN
20042004
#define PUGI_IMPL_SCANCHARTYPE(ct) do { while (offset < size && PUGI_IMPL_IS_CHARTYPE(data[offset], ct)) offset++; } while (0)
20052005

20062006
// check if we have a non-empty XML declaration
2007-
if (size < 6 || !((data[0] == '<') & (data[1] == '?') & (data[2] == 'x') & (data[3] == 'm') & (data[4] == 'l') && PUGI_IMPL_IS_CHARTYPE(data[5], ct_space)))
2007+
if (size < 6 || !(((data[0] == '<') & (data[1] == '?') & (data[2] == 'x') & (data[3] == 'm') & (data[4] == 'l')) && PUGI_IMPL_IS_CHARTYPE(data[5], ct_space)))
20082008
return false;
20092009

20102010
// scan XML declaration until the encoding field

0 commit comments

Comments
 (0)