aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 1d21b02..0237461 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -293,7 +293,7 @@ void ayatana_common_utils_elipsize(char *sText)
}
}
- if (nLetters > nMaxLetters + 4)
+ if (nMaxLetters > 0 && nLetters > nMaxLetters + 4)
{
gchar *pLastChar = g_utf8_offset_to_pointer(sText, nMaxLetters);
memcpy(pLastChar, "...\0", 4);