diff --git a/top/top.c b/top/top.c index 49a13caf..77781ba3 100644 --- a/top/top.c +++ b/top/top.c @@ -1674,7 +1674,7 @@ static inline const char *make_str_utf8 (const char *str, int width, int justr, static char buf[SCREENMAX]; int delta = utf8_delta(str); - if (width + delta <= snprintf(buf, sizeof(buf), "%s", str)) { + if (width + delta < snprintf(buf, sizeof(buf), "%s", str)) { snprintf(buf, sizeof(buf), "%.*s", utf8_embody(str, width - 1), str); delta = utf8_delta(buf); buf[width + delta - 1] = COLPLUSCH;