Fixed bug where _cb_load_attr() and attrgroup_load() weren't correctly comparing the storage driver found inside the string returned by prefs_get_storage_path(). Fixes

This commit is contained in:
relesgoe 2020-11-30 23:08:54 -08:00
parent e10e3e606b
commit 0afb991c35

View file

@ -273,7 +273,7 @@ namespace pvpgn
t_attrgroup *attrgroup = (t_attrgroup *)data;
#ifdef WITH_SQL
if (strcmp(prefs_get_storage_path(), "sql") == 0)
if (std::strncmp(prefs_get_storage_path(), "sql", std::strlen("sql")) == 0)
{
const char *tab = key_get_tab(key);
@ -302,7 +302,7 @@ namespace pvpgn
if (FLAG_ISSET(attrgroup->flags, ATTRGROUP_FLAG_LOADED))
{
#ifdef WITH_SQL
if (strcmp(prefs_get_storage_path(), "sql") == 0)
if (std::strncmp(prefs_get_storage_path(), "sql", std::strlen("sql")) == 0)
{
// find a tab
for (std::vector<const char *>::iterator it = attrgroup->loadedtabs->begin(); it != attrgroup->loadedtabs->end(); ++it)