From 44ad386d740b68f751c8615382994d2d6fd96c91 Mon Sep 17 00:00:00 2001 From: cjdebenh Date: Thu, 28 Dec 2000 05:30:53 +0000 Subject: [PATCH] Quick patch to add sanity checking incase w->x is not set to a valid value. I encountered this problem being caused by a variety of client. Line added is #180 --- server/render.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/render.c b/server/render.c index 0d632f0..5ce4429 100644 --- a/server/render.c +++ b/server/render.c @@ -177,6 +177,7 @@ draw_frame (LL * list, char fscroll, int left, int top, int right, int bottom, i case WID_STRING: if ((w->x > 0) && (w->y > 0) && (w->text)) { if ((w->y <= hgt + fy) && (w->y > fy)) { + if (w->x > wid) { w->x=wid; }; strncpy (str, w->text, wid - w->x + 1); str[wid - w->x + 1] = 0; lcd.string (w->x + left, w->y + top - fy, str);