hashing bugfix: '<<' rather than '<<=' operator was used

This commit is contained in:
John McCardle 2026-01-09 13:45:36 -05:00
commit 2c320effc6
2 changed files with 4 additions and 4 deletions

View file

@ -92,9 +92,9 @@ Py_hash_t PyColor::hash(PyObject* obj)
auto self = (PyColorObject*)obj;
Py_hash_t value = 0;
value += self->data.r;
value << 8; value += self->data.g;
value << 8; value += self->data.b;
value << 8; value += self->data.a;
value <<= 8; value += self->data.g;
value <<= 8; value += self->data.b;
value <<= 8; value += self->data.a;
return value;
}

View file

@ -160,7 +160,7 @@ Py_hash_t PyVector::hash(PyObject* obj)
auto self = (PyVectorObject*)obj;
Py_hash_t value = 0;
value += self->data.x;
value << 8; value += self->data.y;
value <<= 8; value += self->data.y;
return value;
}