diff options
Diffstat (limited to 'core/fxge/ge/fx_ge_text.cpp')
-rw-r--r-- | core/fxge/ge/fx_ge_text.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index ca88879d10..cc7ef7c6d7 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -79,10 +79,14 @@ FX_RECT FXGE_GetGlyphsBBox(const std::vector<FXTEXT_GLYPHPOS>& glyphs, continue; if (bStarted) { - rect.left = std::min(rect.left, char_left.ValueOrDie()); - rect.right = std::max(rect.right, char_right.ValueOrDie()); - rect.top = std::min(rect.top, char_top.ValueOrDie()); - rect.bottom = std::max(rect.bottom, char_bottom.ValueOrDie()); + rect.left = pdfium::base::ValueOrDieForType<int32_t>( + pdfium::base::CheckMin(rect.left, char_left)); + rect.right = pdfium::base::ValueOrDieForType<int32_t>( + pdfium::base::CheckMax(rect.right, char_right)); + rect.top = pdfium::base::ValueOrDieForType<int32_t>( + pdfium::base::CheckMin(rect.top, char_top)); + rect.bottom = pdfium::base::ValueOrDieForType<int32_t>( + pdfium::base::CheckMax(rect.bottom, char_bottom)); continue; } |