diff options
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index fe943d780..793a14d20 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -1066,15 +1066,17 @@ void Fl_Scalable_Graphics_Driver::draw_image_rescale(void *buf, Fl_Draw_Image_Cb if (L == 0) L = W*aD; int depth = mono ? (aD%2==0?2:1) : aD; uchar *tmp_buf = new uchar[W*H*depth]; + int i; if (cb) { - for (int i = 0; i < H; i++) { + for (i = 0; i < H; i++) { cb(buf, 0, i, W, tmp_buf + i * W * depth); } } else { uchar *q, *p = tmp_buf; - for (int i = 0; i < H; i++) { + for (i = 0; i < H; i++) { q = (uchar*)buf + i * L; - for (int j = 0; j < W; j++) { + int j; + for (j = 0; j < W; j++) { memcpy(p, q, depth); p += depth; q += D; } |
