Closed beta 1000014001: fixed Xcode build.

This commit is contained in:
John Preston 2017-02-25 20:46:21 +03:00
parent 6b70cc342a
commit bcec2f6b84
4 changed files with 6 additions and 5 deletions

View file

@ -146,7 +146,7 @@ auto PassKey = MTP::AuthKeyPtr();
auto LocalKey = MTP::AuthKeyPtr();
void createLocalKey(const QByteArray &pass, QByteArray *salt, MTP::AuthKeyPtr *result) {
auto key = MTP::AuthKey::Data { 0 };
auto key = MTP::AuthKey::Data { { 0 } };
auto iterCount = pass.size() ? LocalEncryptIterCount : LocalEncryptNoPwdIterCount; // dont slow down for no password
auto newSalt = QByteArray();
if (!salt) {
@ -923,7 +923,7 @@ bool _readSetting(quint32 blockId, QDataStream &stream, int version, ReadSetting
case dbiKey: {
qint32 dcId;
MTP::AuthKey::Data key = { 0 };
auto key = MTP::AuthKey::Data { { 0 } };
stream >> dcId;
stream.readRawData(key.data(), key.size());
if (!_checkStreamStatus(stream)) return false;
@ -1858,7 +1858,7 @@ ReadMapState _readMap(const QByteArray &pass) {
LOG(("App Info: could not decrypt pass-protected key from map file, maybe bad password..."));
return ReadMapPassNeeded;
}
auto key = MTP::AuthKey::Data { 0 };
auto key = MTP::AuthKey::Data { { 0 } };
if (keyData.stream.readRawData(key.data(), key.size()) != key.size() || !keyData.stream.atEnd()) {
LOG(("App Error: could not read pass-protected key from map file"));
return ReadMapFailed;

View file

@ -111,7 +111,7 @@ private:
Type _type = Type::Generated;
DcId _dcId = 0;
Data _key = { 0 };
Data _key = { { 0 } };
KeyId _keyId = 0;
};

View file

@ -264,7 +264,7 @@ private:
struct AuthKeyCreateStrings {
QByteArray dh_prime;
QByteArray g_a;
AuthKey::Data auth_key = { 0 };
AuthKey::Data auth_key = { { 0 } };
};
std::unique_ptr<AuthKeyCreateData> _authKeyData;
std::unique_ptr<AuthKeyCreateStrings> _authKeyStrings;

View file

@ -25,6 +25,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "localstorage.h"
#include "passcodewidget.h"
#include "mainwindow.h"
#include "history/history_location_manager.h"
#include <execinfo.h>