summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 0af43d08b2..e991e456b7 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1506,10 +1506,14 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, bool bStroke) {
m_pPathPoints[PathPointCount - 1].IsTypeAndOpen(FXPT_TYPE::MoveTo)) {
PathPointCount--;
}
+
CPDF_Path Path;
- Path.SetPointCount(PathPointCount);
- FXSYS_memcpy(Path.GetMutablePoints(), m_pPathPoints,
- sizeof(FX_PATHPOINT) * PathPointCount);
+ for (int i = 0; i < PathPointCount; i++) {
+ FX_PATHPOINT& point = m_pPathPoints[i];
+ Path.AppendPoint(point.m_PointX, point.m_PointY, point.m_Type,
+ point.m_CloseFigure);
+ }
+
CFX_Matrix matrix = m_pCurStates->m_CTM;
matrix.Concat(m_mtContentToUser);
if (bStroke || FillType) {