Fix crash in QR code copy on scale < 100.

This commit is contained in:
John Preston 2025-01-06 21:14:15 +04:00
parent e0dd77f0c3
commit 343560225c

View file

@ -850,7 +850,7 @@ void FillPeerQrBox(
const auto backgroundToggled = state->backgroundToggled.current();
const auto scale = style::kScaleDefault
* (kMaxQualities + int(state->scaleValue.current() * 2));
const auto divider = std::max(1, style::Scale())
const auto divider = std::max(100, style::Scale())
/ style::kScaleDefault;
const auto profileQrBackgroundRadius = style::ConvertScale(
st::profileQrBackgroundRadius / divider,