[Scummvm-git-logs] scummvm master -> 3b993aad104fca88e3b892d7a7ebd3a21e26d97c
grisenti
noreply at scummvm.org
Thu Oct 19 12:51:39 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3b993aad10 HPL1: Zero initialize dgVector
Commit: 3b993aad104fca88e3b892d7a7ebd3a21e26d97c
https://github.com/scummvm/scummvm/commit/3b993aad104fca88e3b892d7a7ebd3a21e26d97c
Author: grisenti (emanuele at grisenti.net)
Date: 2023-10-19T14:51:06+02:00
Commit Message:
HPL1: Zero initialize dgVector
Uninitialized values are often used as out arguments, and functions may forget to initialize all members, which might lead to assertion triggering unexpectedly.
Changed paths:
engines/hpl1/engine/libraries/newton/core/dgVector.h
diff --git a/engines/hpl1/engine/libraries/newton/core/dgVector.h b/engines/hpl1/engine/libraries/newton/core/dgVector.h
index 9dabed8bc08..204cd9d576a 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgVector.h
+++ b/engines/hpl1/engine/libraries/newton/core/dgVector.h
@@ -33,7 +33,7 @@
template<class T>
class dgTemplateVector {
public:
- dgTemplateVector() = default;
+ dgTemplateVector() : m_x(0), m_y(0), m_z(0), m_w(0) {}
dgTemplateVector(const T *ptr);
constexpr dgTemplateVector(T m_x, T m_y, T m_z, T m_w);
dgTemplateVector Scale(T s) const;
More information about the Scummvm-git-logs
mailing list