cssselector: Don't invoke undefined behavior
Avoid undefined behavior in the calculation of some hash values. Found by gcc's undefined behavior sanitizer.
This commit is contained in:
parent
2cabfcc801
commit
6108c646c5
@ -842,7 +842,7 @@ match_pseudoclass_position (const GtkCssSelector *selector,
|
||||
static guint
|
||||
hash_pseudoclass_position (const GtkCssSelector *a)
|
||||
{
|
||||
return (((a->position.type << POSITION_NUMBER_BITS) | a->position.a) << POSITION_NUMBER_BITS) | a->position.b;
|
||||
return (guint)(((((gulong)a->position.type) << POSITION_NUMBER_BITS) | a->position.a) << POSITION_NUMBER_BITS) | a->position.b;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user