summaryrefslogtreecommitdiff
path: root/bk_man.c
diff options
context:
space:
mode:
Diffstat (limited to 'bk_man.c')
-rw-r--r--bk_man.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bk_man.c b/bk_man.c
index 45eb511..68b942f 100644
--- a/bk_man.c
+++ b/bk_man.c
@@ -629,7 +629,7 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end,
charset_state s2 = *state;
int len = ustrlen(text->text), hyphen = FALSE;
- if (text->breaks && text->text[len - 1] == '-') {
+ if (text->breaks && len > 0 && text->text[len - 1] == '-') {
len--;
hyphen = TRUE;
}