Add 'const' to the draw_polygon coords array parameter. Thanks to Mouse for spotting that it was missing.