@@ -246,7 +246,8 @@ int main(int argc, char** argv) {
246
246
// Regenerate hash based on new password
247
247
char salt[BCRYPT_HASHSIZE];
248
248
char hash[BCRYPT_HASHSIZE];
249
- assert (GenerateBCryptPassword (password, 12 , salt, hash) == 0 );
249
+ int res = GenerateBCryptPassword (password, 12 , salt, hash);
250
+ assert (res == 0 );
250
251
251
252
Database::Get ()->UpdateAccountPassword (accountId->id , std::string (hash, BCRYPT_HASHSIZE));
252
253
@@ -284,7 +285,8 @@ int main(int argc, char** argv) {
284
285
// Generate new hash for bcrypt
285
286
char salt[BCRYPT_HASHSIZE];
286
287
char hash[BCRYPT_HASHSIZE];
287
- assert (GenerateBCryptPassword (password, 12 , salt, hash) == 0 );
288
+ int res = GenerateBCryptPassword (password, 12 , salt, hash);
289
+ assert (res == 0 );
288
290
289
291
// Create account
290
292
try {
@@ -323,7 +325,8 @@ int main(int argc, char** argv) {
323
325
char salt[BCRYPT_HASHSIZE];
324
326
char hash[BCRYPT_HASHSIZE];
325
327
const auto & cfgPassword = Game::config->GetValue (" master_password" );
326
- GenerateBCryptPassword (!cfgPassword.empty () ? cfgPassword : " 3.25DARKFLAME1" , 13 , salt, hash);
328
+ int res = GenerateBCryptPassword (!cfgPassword.empty () ? cfgPassword : " 3.25DARKFLAME1" , 13 , salt, hash);
329
+ assert (res == 0 );
327
330
328
331
Game::server = new dServer (ourIP, ourPort, 0 , maxClients, true , false , Game::logger, " " , 0 , ServerType::Master, Game::config, &Game::lastSignal, hash);
329
332
0 commit comments