summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/engine/text.h')
-rw-r--r--src/graphics/engine/text.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h
index cc18f55..7fa8768 100644
--- a/src/graphics/engine/text.h
+++ b/src/graphics/engine/text.h
@@ -149,9 +149,12 @@ enum FontMask
struct UTF8Char
{
char c1, c2, c3;
+ // Padding for 4-byte alignment
+ // It also seems to fix some problems reported by valgrind
+ char pad;
explicit UTF8Char(char ch1 = '\0', char ch2 = '\0', char ch3 = '\0')
- : c1(ch1), c2(ch2), c3(ch3) {}
+ : c1(ch1), c2(ch2), c3(ch3), pad('\0') {}
inline bool operator<(const UTF8Char &other) const
{