summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'amiga')
-rw-r--r--amiga/font.c6
-rwxr-xr-xamiga/gui.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/amiga/font.c b/amiga/font.c
index ffecf85fe..33f71a926 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -156,7 +156,7 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle,
for(i=0;i<len;i++)
{
- if (*utf16 < 0xD800 || 0xDFFF < *utf16)
+ if ((*utf16 < 0xD800) || (0xDFFF < *utf16))
utf16charlen = 1;
else
utf16charlen = 2;
@@ -263,7 +263,7 @@ bool nsfont_split(const plot_font_style_t *fstyle,
{
utf8len = utf8_char_byte_length(string+utf8clen);
- if (*utf16 < 0xD800 || 0xDFFF < *utf16)
+ if ((*utf16 < 0xD800) || (0xDFFF < *utf16))
utf16charlen = 1;
else
utf16charlen = 2;
@@ -722,7 +722,7 @@ ULONG ami_unicode_text(struct RastPort *rp, const char *string, ULONG length,
while(*utf16 != 0)
{
- if (*utf16 < 0xD800 || 0xDFFF < *utf16)
+ if ((*utf16 < 0xD800) || (0xDFFF < *utf16))
utf16charlen = 1;
else
utf16charlen = 2;
diff --git a/amiga/gui.c b/amiga/gui.c
index 43412704a..a33724f9b 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3630,24 +3630,22 @@ void ami_do_redraw_tiled(struct gui_window_2 *gwin,
if(width <= 0) return;
if(height <= 0) return;
-// printf("%ld %ld %ld %ld\n",left, top, width, height);
-
ami_set_pointer(gwin, GUI_POINTER_WAIT, false);
for(y = top; y < (top + height); y += tile_y_scale) {
clip.y0 = 0;
clip.y1 = nsoption_int(redraw_tile_size_y);
+ if(clip.y1 > height) clip.y1 = height;
if((((y - sy) * gwin->bw->scale) + clip.y1) > bbox->Height)
clip.y1 = bbox->Height - ((y - sy) * gwin->bw->scale);
for(x = left; x < (left + width); x += tile_x_scale) {
clip.x0 = 0;
clip.x1 = nsoption_int(redraw_tile_size_x);
+ if(clip.x1 > width) clip.x1 = width;
if((((x - sx) * gwin->bw->scale) + clip.x1) > bbox->Width)
clip.x1 = bbox->Width - ((x - sx) * gwin->bw->scale);
-//printf("%ld %ld -> %ld %ld\n",clip.x0 - (int)(x), clip.y0 - (int)(y), clip.x1, clip.y1);
-
if(browser_window_redraw(gwin->bw,
clip.x0 - (int)x,
clip.y0 - (int)y,