mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fix crash in new phone formatting.
This commit is contained in:
parent
df15c67dab
commit
88a2f05c6d
1 changed files with 3 additions and 0 deletions
|
@ -355,6 +355,9 @@ FormatResult CountriesInstance::format(FormatArgs args) {
|
||||||
? QVector<int>()
|
? QVector<int>()
|
||||||
: QVector<int>{ codeSize };
|
: QVector<int>{ codeSize };
|
||||||
auto groupSize = 0;
|
auto groupSize = 0;
|
||||||
|
if (bestCallingCodePtr->patterns.empty()) {
|
||||||
|
return FormatResult{ .groups = std::move(groups) };
|
||||||
|
}
|
||||||
for (const auto &c : bestCallingCodePtr->patterns.front()) {
|
for (const auto &c : bestCallingCodePtr->patterns.front()) {
|
||||||
if (c == ' ') {
|
if (c == ' ') {
|
||||||
groups.push_back(base::take(groupSize));
|
groups.push_back(base::take(groupSize));
|
||||||
|
|
Loading…
Add table
Reference in a new issue