diff --git a/src/persistence/settingsserializer.cpp b/src/persistence/settingsserializer.cpp index 0d107a6cc..698aecbe2 100644 --- a/src/persistence/settingsserializer.cpp +++ b/src/persistence/settingsserializer.cpp @@ -364,6 +364,11 @@ void SettingsSerializer::readSerialized() beginReadArray(QString::fromUtf8(prefix)); QByteArray sizeData; stream >> sizeData; + if (sizeData.isEmpty()) + { + qWarning("The personnal save file is corrupted!"); + return; + } quint64 size = dataToVUint(sizeData); arrays[array].size = max(size, arrays[array].size); //qDebug()<<"!Array start"<> indexData; + if (indexData.isEmpty()) + { + qWarning("The personnal save file is corrupted!"); + return; + } quint64 index = dataToVUint(indexData); setArrayIndex(index); QByteArray key;