nsxiv4c29401
Use float for ox/oy compare values
Fixes issue #302
+4 −4
1 file changed
- M image.c +4 −4
| @@ -366,8 +366,7 @@ CLEANUP void img_close(img_t *img, bool decache) | |||
| 366 | 366 | void img_check_pan(img_t *img, bool moved) | |
| 367 | 367 | { | |
| 368 | 368 | win_t *win; | |
| 369 | − | int ox, oy; | |
| 370 | − | float w, h; | |
| 369 | + | float w, h, ox, oy; | |
| 371 | 370 | ||
| 372 | 371 | win = img->win; | |
| 373 | 372 | w = img->w * img->zoom; | |
| @@ -640,7 +639,7 @@ bool img_pan(img_t *img, direction_t dir, int d) | |||
| 640 | 639 | ||
| 641 | 640 | bool img_pan_edge(img_t *img, direction_t dir) | |
| 642 | 641 | { | |
| 643 | − | int ox, oy; | |
| 642 | + | float ox, oy; | |
| 644 | 643 | ||
| 645 | 644 | ox = img->x; | |
| 646 | 645 | oy = img->y; | |
| @@ -666,7 +665,8 @@ bool img_pan_edge(img_t *img, direction_t dir) | |||
| 666 | 665 | ||
| 667 | 666 | void img_rotate(img_t *img, degree_t d) | |
| 668 | 667 | { | |
| 669 | − | int i, ox, oy, tmp; | |
| 668 | + | int i, tmp; | |
| 669 | + | float ox, oy; | |
| 670 | 670 | ||
| 671 | 671 | imlib_context_set_image(img->im); | |
| 672 | 672 | imlib_image_orientate(d); | |