diff options
author | John Fultz <jfultz@wolfram.com> | 2015-08-24 04:45:27 -0500 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2015-08-24 04:45:46 -0500 |
commit | 1f7b8ef6f96e1d5a2c50565a0f52cc633215e485 (patch) | |
tree | 11f406677824d20924748225ab7eb129ba929cd0 /quackleio/dawgfactory.cpp | |
parent | 8c7ffef1b6c669592e979fb6038dd634df7f95fc (diff) |
Version the GADDAGs.
Basically the same thing I just did to the DAWG files,
now done to GADDAGs. Also, add hashing, and
make sure GADDAGs only load if their hash matches
that of the DAWG files.
Diffstat (limited to 'quackleio/dawgfactory.cpp')
-rw-r--r-- | quackleio/dawgfactory.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/quackleio/dawgfactory.cpp b/quackleio/dawgfactory.cpp index 6fb5be0..74b4346 100644 --- a/quackleio/dawgfactory.cpp +++ b/quackleio/dawgfactory.cpp @@ -138,6 +138,7 @@ void DawgFactory::writeIndex(const QString& filename) bytes[1] = (m_encodableWords & 0x0000FF00) >> 8; bytes[2] = (m_encodableWords & 0x000000FF); + out.put(1); // DAWG format version 1 out.write(m_hash.charptr, sizeof(m_hash.charptr)); out.write((char*)bytes, 3); |