DarkRadiant: master 74cc6f97
| Author | Committer | Branch | Timestamp | Parent |
|---|---|---|---|---|
| orbweaver | orbweaver | master | 28.01.2025 20:31 | master 94964a5f |
| Changeset | Fix a failing selection test "Vector3(x, y, z) + 20" looks like it should perform a scalar addition of 20 to the Vector3 elements, but it does not: there is no operator+ defined which takes a Vector3 and a scalar. What this actually does is implicitly cast the Vector3 to a double*, perform pointer arithmetic on the result, then construct a new Vector3 with whatever random garbage happens to be at the invalid memory location. For now the test is fixed locally, but this implicit cast to a raw pointer is obviously extremely dangerous and needs to be fixed in the Vector classes themselves. |
|||
| mod - test/Selection.cpp | Diff File | |||