Do not write unitialized bytes in the dictionary header.

These bytes wouldn't be read anyway, but it is cleaner and makes
valgrind happy.
This commit is contained in:
Olivier Teulière 2012-10-14 14:31:44 +02:00
parent 02249c214e
commit 2663a62ecb

View file

@ -113,6 +113,12 @@ struct Dict_header_old
/** Extension of the old format (used in version 1) */
struct Dict_header_ext
{
Dict_header_ext()
{
// Make sure we won't write uninitialized bytes
memset(this, 0, sizeof(*this));
}
// Time when the dictionary was compressed
// (number of seconds since the Epoch)
uint64_t compressDate;
@ -166,6 +172,12 @@ struct Dict_header_ext
/** Extension of the extension :-) (used in version 2) */
struct Dict_header_ext_2
{
Dict_header_ext_2()
{
// Make sure we won't write uninitialized bytes
memset(this, 0, sizeof(*this));
}
// Additional information concerning the display strings and the
// alternative input strings of the letters
char displayAndInput[_MAX_DISPLAY_INPUT_SIZE_];