summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-10-21 09:04:14 -0400
committerDan Sinclair <dsinclair@chromium.org>2015-10-21 09:04:14 -0400
commit1edb860fd465879311ec85c5c6385067b7985013 (patch)
treeb98487088122ca95966550e2c902b0e3ded66ad5 /core/src/fpdfapi/fpdf_page
parentbbe0e4d3b57f95e93535c95298203c62d62474fe (diff)
downloadpdfium-1edb860fd465879311ec85c5c6385067b7985013.tar.xz
Merge to XFA: Remove void* ctor from CPDF_Number.
This Removes the ctor that took a pointer to the data to store and copied it into the union memory. Instead, the call sites look at the type and pass the correct value. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1422473002 . (cherry picked from commit 8430a5d04883fac4666d0c321fc679bcaf99cb71) Review URL: https://codereview.chromium.org/1417113002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index ffa5e62a07..1283a3a596 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -163,8 +163,10 @@ CPDF_Object* CPDF_StreamContentParser::GetObject(FX_DWORD index) {
}
_ContentParam& param = m_ParamBuf1[real_index];
if (param.m_Type == PDFOBJ_NUMBER) {
- CPDF_Number* pNumber = CPDF_Number::Create(param.m_Number.m_bInteger,
- &param.m_Number.m_Integer);
+ CPDF_Number* pNumber = param.m_Number.m_bInteger
+ ? CPDF_Number::Create(param.m_Number.m_Integer)
+ : CPDF_Number::Create(param.m_Number.m_Float);
+
param.m_Type = 0;
param.m_pObject = pNumber;
return pNumber;