filter: avoid Windows crash

The scope confusion between s (the for loop variable) and s (the function
argument) caused a crash in the s.split() on Windows.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-11-11 13:50:50 -08:00
parent 6133796cda
commit 10a026b2ff
2 changed files with 3 additions and 2 deletions

View file

@ -1,3 +1,4 @@
- Windows: avoid crash when setting filter values for tag-style fields
- mobile: add location service warning as required by Google Play
- mobile: fix manually adding dives in the past [#2971]

View file

@ -686,8 +686,8 @@ void filter_constraint_set_stringlist(filter_constraint &c, const QString &s)
return;
}
c.data.string_list->clear();
for (const QString &s: s.split(",", SKIP_EMPTY))
c.data.string_list->push_back(s.trimmed());
for (const QString &part: s.split(",", SKIP_EMPTY))
c.data.string_list->push_back(part.trimmed());
}
void filter_constraint_set_timestamp_from(filter_constraint &c, timestamp_t from)