diff options
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 7c3894440..fe8e75e0a 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -115,10 +115,10 @@ char *Fl_Wayland_Gl_Window_Driver::alpha_mask_for_string(const char *str, int n, fl_font(f, fs); fl_draw(str, n, 0, fl_height() - fl_descent()); // get the R channel only of the bitmap - char *alpha_buf = new char[w*h], *r = alpha_buf, *q; + char *alpha_buf = new char[w*h], *r = alpha_buf; + struct fl_wld_buffer *off = (struct fl_wld_buffer *)surf->offscreen(); for (int i = 0; i < h; i++) { - struct fl_wld_buffer *off = (struct fl_wld_buffer *)surf->offscreen(); - q = (char*)off->draw_buffer + i * off->stride; + uchar *q = off->draw_buffer + i * off->stride; for (int j = 0; j < w; j++) { *r++ = *q; q += 4; |
