From 95512f591d9dda98e46177013f24a79a8dd648a8 Mon Sep 17 00:00:00 2001 From: mmdolze Date: Mon, 24 Jan 2011 19:46:06 +0000 Subject: [PATCH] Add note about necessary review of render_string (don't have the time right now). --- server/render.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/render.c b/server/render.c index 852a84b..b317ede 100644 --- a/server/render.c +++ b/server/render.c @@ -15,6 +15,8 @@ * NOTE: (from David Douthitt) Multiple screen sizes? Multiple simultaneous * screens? Horrors of horrors... next thing you know it'll be making coffee... * Better believe it'll take a while to do... + * + * \todo Review render_string for correctness. */ /* This file is part of LCDd, the lcdproc server. @@ -308,6 +310,12 @@ render_string(Widget *w, int left, int top, int right, int bottom, int fy) int length; char str[BUFSIZE]; + /* + * FIXME: Could be a bug here? w->x is recalculated (On first + * call only? Is it preserved between calls?) and first + * character of w->text shows up on the rightmost column for + * strings totally off-screen. Is this on purpose? (M. Dolze) + */ w->x = min(w->x, right - left); length = min(right - left - w->x + 1, sizeof(str)-1); strncpy(str, w->text, length);