mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Fix UB in GUISprite Draw
Using the no args constructor m_RoundCoordinates doesn't get initialized, meaning the memory can contain whatever. We were lucky in that in most cases random means true. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
2bc674cbaa
commit
173d768087
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2025 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -168,9 +168,9 @@ public:
|
|||
*/
|
||||
void SetRoundCoordinates(const bool RoundCoordinates);
|
||||
private:
|
||||
CStr m_SpriteName;
|
||||
CStr m_SpriteName{};
|
||||
|
||||
bool m_RoundCoordinates;
|
||||
bool m_RoundCoordinates{true};
|
||||
|
||||
// Stored drawing calls, for more efficient rendering
|
||||
mutable GUIRenderer::DrawCalls m_DrawCallCache;
|
||||
|
|
|
|||
Loading…
Reference in a new issue