From ed13f33e7a05c0bb8c74330a76924b8517f34ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Wed, 31 Aug 2022 18:52:00 +0200 Subject: [PATCH] Fix invalid stamps names being accepted The .size() == 14 check got lost in the last commit. --- src/client/Client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/Client.cpp b/src/client/Client.cpp index f2283fb9e..275ca8cb1 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -983,7 +983,10 @@ void Client::RescanStamps() stampIDs.clear(); for (auto &stamp : Platform::DirectorySearch("stamps", "", { ".stm" })) { - stampIDs.push_front(stamp.Substr(0, 10)); + if (stamp.size() == 14) + { + stampIDs.push_front(stamp.Substr(0, 10)); + } } stampIDs.sort(std::greater()); updateStamps();