diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-11-11 13:50:50 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-11-12 07:46:52 -0800 |
commit | 10a026b2ffd5f9271411fb8e733a3910de88761c (patch) | |
tree | 0275791e3193a16954db7bd4d46ca428b0e7f5b8 | |
parent | 6133796cdafc963713ff15a63ae7e1e538e7fac9 (diff) | |
download | subsurface-10a026b2ffd5f9271411fb8e733a3910de88761c.tar.gz |
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>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | core/filterconstraint.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f14b5350..e71cf72e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/core/filterconstraint.cpp b/core/filterconstraint.cpp index 0468a935c..bcaf72460 100644 --- a/core/filterconstraint.cpp +++ b/core/filterconstraint.cpp @@ -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) |