shithub: puzzles

Download patch

ref: a11a5726b20b013a6638f1a3562bc1be3178c7e3
parent: 85d2a7da62a5656974643ce345f0962d2634b04d
author: Ben Harris <bjh21@bjh21.me.uk>
date: Wed Oct 12 20:13:00 EDT 2022

Add a missing "const" to js_draw_poly and js_canvas_draw_poly

--- a/emcc.c
+++ b/emcc.c
@@ -79,7 +79,7 @@
 extern void js_canvas_unclip(void);
 extern void js_canvas_draw_line(float x1, float y1, float x2, float y2,
                                 int width, const char *colour);
-extern void js_canvas_draw_poly(int *points, int npoints,
+extern void js_canvas_draw_poly(const int *points, int npoints,
                                 const char *fillcolour,
                                 const char *outlinecolour);
 extern void js_canvas_draw_circle(int x, int y, int r,
@@ -424,7 +424,7 @@
     js_canvas_draw_line(x1, y1, x2, y2, thickness, colour_strings[colour]);
 }
 
-static void js_draw_poly(void *handle, int *coords, int npoints,
+static void js_draw_poly(void *handle, const int *coords, int npoints,
                          int fillcolour, int outlinecolour)
 {
     js_canvas_draw_poly(coords, npoints,