diff options
| author | levlam <levlam@telegram.org> | 2018-04-06 19:58:16 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2018-04-06 19:58:16 +0300 |
| commit | a48fe6d2a5d11b74a2118b72084d2884c753ab82 (patch) | |
| tree | e958f789705e3ed024654eaef23e040f6090ef1c /td/telegram/SecureStorage.cpp | |
| parent | f97de8b6ae2f42ef9880797afeef0738255ef981 (diff) | |
Fix gcc warning.
GitOrigin-RevId: e4d1ebf7674a95c4ae292322679575daa08d9924
Diffstat (limited to 'td/telegram/SecureStorage.cpp')
| -rw-r--r-- | td/telegram/SecureStorage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/td/telegram/SecureStorage.cpp b/td/telegram/SecureStorage.cpp index c0b2192fb..c14c8675b 100644 --- a/td/telegram/SecureStorage.cpp +++ b/td/telegram/SecureStorage.cpp @@ -175,7 +175,7 @@ Secret Secret::create_new() { auto secret_slice = td::as_slice(secret); Random::secure_bytes(secret_slice); auto checksum_diff = secret_checksum(secret_slice); - uint8 new_byte = (static_cast<uint32>(secret_slice.ubegin()[0]) + checksum_diff) % 255; + uint8 new_byte = static_cast<uint8>((static_cast<uint32>(secret_slice.ubegin()[0]) + checksum_diff) % 255); secret_slice.ubegin()[0] = new_byte; return create(secret_slice).move_as_ok(); } |
