mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Fix some undefined behavior issues?
MakeAnyLenString results in UB (I think?) and is aggressively optimized out with clang GrantAlternateAdvancementAbility were missing return statements and clang had fun times with those functions too
This commit is contained in:
+1
-7
@@ -860,17 +860,11 @@ void Database::GetCharName(uint32 char_id, char* name) {
|
||||
}
|
||||
|
||||
bool Database::LoadVariables() {
|
||||
char *query = nullptr;
|
||||
|
||||
auto results = QueryDatabase(query, LoadVariables_MQ(&query));
|
||||
auto results = QueryDatabase(StringFormat("SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= %d", varcache_lastupdate));
|
||||
|
||||
if (!results.Success())
|
||||
{
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
safe_delete_array(query);
|
||||
return LoadVariables_result(std::move(results));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user