Skip to content

Commit 9d35c6b

Browse files
committed
Fixed a very dumb bug
1 parent e33d4aa commit 9d35c6b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/utils.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ struct vec2 {
1616
vec2(T x, T y) : x(x), y(y) {}
1717
vec2(const vec2& other) : x(other.x), y(other.y) {}
1818
vec2& operator=(const vec2& other) {
19-
if (this != &other) *this = vec2(other);
19+
if (this != &other) {
20+
x = other.x;
21+
y = other.y;
22+
}
2023
return *this;
2124
}
2225

0 commit comments

Comments
 (0)