From f06e47e4c02793186e0cb85966d7e4aac63c0618 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 31 Aug 2008 23:31:07 -0400 Subject: snapshot of project "lynx", label v2-8-7dev_9f --- src/LYUtils.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/LYUtils.c') diff --git a/src/LYUtils.c b/src/LYUtils.c index 806dfd06..4a7063ab 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,4 +1,4 @@ -/* $LynxId: LYUtils.c,v 1.168 2008/06/29 21:44:03 tom Exp $ */ +/* $LynxId: LYUtils.c,v 1.169 2008/08/31 19:03:45 tom Exp $ */ #include #include #include @@ -1085,12 +1085,15 @@ void LYhighlight(int flag, int avail_space = (LYcolLimit - LXP) + (LYcolLimit * (LYlines - LYP)); const char *text = LYGetHiliteStr(cur, 0); + if (text == 0) + text = ""; + if (avail_space > links[cur].l_form->size) avail_space = links[cur].l_form->size; - gllen = LYmbcsstrlen(NonNull(text), utf_flag, NO); - len = LYmbcs_skip_glyphs(NonNull(text), avail_space, utf_flag) - text; - LYwaddnstr(LYwin, NonNull(text), len); + gllen = LYmbcsstrlen(text, utf_flag, NO); + len = LYmbcs_skip_glyphs(text, avail_space, utf_flag) - text; + LYwaddnstr(LYwin, text, len); while (gllen++ < avail_space) LYaddch('_'); -- cgit 1.4.1-2-gfad0