From 2c320effc6dbceac287e7484d3e7cec3e38538d1 Mon Sep 17 00:00:00 2001 From: John McCardle Date: Fri, 9 Jan 2026 13:45:36 -0500 Subject: [PATCH] hashing bugfix: '<<' rather than '<<=' operator was used --- src/PyColor.cpp | 6 +++--- src/PyVector.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PyColor.cpp b/src/PyColor.cpp index 75d5242..9e352af 100644 --- a/src/PyColor.cpp +++ b/src/PyColor.cpp @@ -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; } diff --git a/src/PyVector.cpp b/src/PyVector.cpp index 4315b30..391d141 100644 --- a/src/PyVector.cpp +++ b/src/PyVector.cpp @@ -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; }