diff options
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 01c36199b..c6d8df771 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -683,7 +683,12 @@ void SurfaceGDI::LineTo(int x_, int y_) { void SurfaceGDI::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColor(back); - ::Polygon(hdc, reinterpret_cast<POINT *>(pts), npts); + std::vector<POINT> outline; + for (int i=0;i<npts;i++) { + POINT pt = {pts[i].x, pts[i].y}; + outline.push_back(pt); + } + ::Polygon(hdc, &outline[0], npts); } void SurfaceGDI::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) { |