summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Cache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 2d87304c..7671af02 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -4424,7 +4424,9 @@ Cache::displayName(const QString &room_id, const QString &user_id) static bool isDisplaynameSafe(const std::string &s) { - for (QChar c : QString::fromStdString(s)) { + const auto str = QString::fromStdString(s); + + for (QChar c : str) { if (c.isPrint() && !c.isSpace()) return false; }