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
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -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<ByteString>());
updateStamps();