diff options
author | Nicolas Pena <npm@chromium.org> | 2018-05-31 00:32:14 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-31 00:32:14 +0000 |
commit | 8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c (patch) | |
tree | 2aad509d1499dfd5b2837ab2102e917618f78231 /core/fxge/cfx_font.h | |
parent | e434833e5cefb00482223049d624301b10450717 (diff) | |
download | pdfium-8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c.tar.xz |
Fix font regression in AdjustMMParams
Commit 2334660 changed the |dest_width| in CFX_Font::AdjustMMParams to
unsigned, but this means that dest_width - min_width becomes unsigned,
which is wrong because the subtraction could be negative. This CL fixes
this bug.
Bug: chromium:845697
Change-Id: I88fb2f3ee3837d80ff5fa70a08309d9e0fec50e0
Reviewed-on: https://pdfium-review.googlesource.com/33150
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/cfx_font.h')
-rw-r--r-- | core/fxge/cfx_font.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxge/cfx_font.h b/core/fxge/cfx_font.h index 7ef8ed7fa8..fbf35eaca1 100644 --- a/core/fxge/cfx_font.h +++ b/core/fxge/cfx_font.h @@ -84,7 +84,7 @@ class CFX_Font { #endif uint8_t* GetFontData() const { return m_pFontData; } uint32_t GetSize() const { return m_dwSize; } - void AdjustMMParams(int glyph_index, uint32_t dest_width, int weight) const; + void AdjustMMParams(int glyph_index, int dest_width, int weight) const; CFX_PathData* LoadGlyphPathImpl(uint32_t glyph_index, uint32_t dest_width) const; |