diff options
Diffstat (limited to 'src/format/KdbxWriter.h')
-rw-r--r-- | src/format/KdbxWriter.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/format/KdbxWriter.h b/src/format/KdbxWriter.h index 6d759bad2..d5e214a51 100644 --- a/src/format/KdbxWriter.h +++ b/src/format/KdbxWriter.h @@ -77,8 +77,7 @@ protected: { Q_ASSERT(static_cast<unsigned long>(data.size()) < (1ull << (sizeof(SizedQInt) * 8))); - QByteArray fieldIdArr; - fieldIdArr[0] = static_cast<char>(fieldId); + QByteArray fieldIdArr(1, static_cast<char>(fieldId)); CHECK_RETURN_FALSE(writeData(device, fieldIdArr)); CHECK_RETURN_FALSE(writeData( device, Endian::sizedIntToBytes<SizedQInt>(static_cast<SizedQInt>(data.size()), KeePass2::BYTEORDER))); |