chiark / gitweb /
constify CanonImage->rgb and make a copy in find_islandname
[ypp-sc-tools.web-live.git] / pctb / pages.c
index c504c951e75956e77b2a3c2ad6e9504d169bab62..010299948d929d3f1ce247d683de11b900bb6697 100644 (file)
@@ -516,12 +516,12 @@ static void set_focus_commodity(void) {
   debugf("PAGING raise_and_set_focus done.\n");
 }
 
-static CanonImage *convert_page(Snapshot *sn) {
+static CanonImage *convert_page(const Snapshot *sn) {
   CanonImage *im;
 
   fwrite_ppmraw(screenshot_file, sn);
 
-  unsigned char *pixel= sn->data;
+  const unsigned char *pixel= sn->data;
   CANONICALISE_IMAGE(im, sn->w, sn->h, {
     r= *pixel++;
     g= *pixel++;