From 343560225c4b127cd527e95c538a5dbea8ca8c66 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 6 Jan 2025 21:14:15 +0400 Subject: [PATCH] Fix crash in QR code copy on scale < 100. --- Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp index 33e7096d0..d7e853bd7 100644 --- a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp @@ -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,