Fix invalid stamps names being accepted

The .size() == 14 check got lost in the last commit.
This commit is contained in:
Tamás Bálint Misius
2022-08-31 18:52:00 +02:00
parent 9e712eba08
commit ed13f33e7a

View File

@@ -982,9 +982,12 @@ void Client::RescanStamps()
{ {
stampIDs.clear(); stampIDs.clear();
for (auto &stamp : Platform::DirectorySearch("stamps", "", { ".stm" })) for (auto &stamp : Platform::DirectorySearch("stamps", "", { ".stm" }))
{
if (stamp.size() == 14)
{ {
stampIDs.push_front(stamp.Substr(0, 10)); stampIDs.push_front(stamp.Substr(0, 10));
} }
}
stampIDs.sort(std::greater<ByteString>()); stampIDs.sort(std::greater<ByteString>());
updateStamps(); updateStamps();
} }