diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-04 18:09:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 18:09:47 +0100 |
commit | f356c8ac4bfb16be361d8ff21ecbb406baa6e631 (patch) | |
tree | 8d20e4af3bfe2ff468e2ea46ccf382e4193e7cb8 /scene/resources | |
parent | 4514de43847794647841f1dddb50d37c936eabfa (diff) | |
parent | b2e19b24998e40d407b591cd58c3e37f5e319ee8 (diff) |
Merge pull request #58755 from akien-mga/gcc-silence-Wstringop-overflow-false-positive
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/animation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 312a557602..f6e0df0265 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -4347,7 +4347,7 @@ struct AnimationCompressionDataState { if (temp_packets.size() == 0) { return; //nohing to do } -#define DEBUG_PACKET_PUSH +//#define DEBUG_PACKET_PUSH #ifdef DEBUG_PACKET_PUSH #ifndef _MSC_VER #warning Debugging packet push, disable this code in production to gain a bit more import performance. @@ -4378,7 +4378,7 @@ struct AnimationCompressionDataState { header_bytes += 2; } - while (header_bytes % 4 != 0) { + while (header_bytes < 8 && header_bytes % 4 != 0) { // First cond needed to silence wrong GCC warning. header[header_bytes++] = 0; } |