diff --git a/bin/xbps-query/list.c b/bin/xbps-query/list.c index cf853314..b16663dc 100644 --- a/bin/xbps-query/list.c +++ b/bin/xbps-query/list.c @@ -81,9 +81,9 @@ list_pkgs_in_dict(struct xbps_handle *xhp UNUSED, short_desc); /* add ellipsis if the line was truncated */ if (len >= lpc->maxcols && lpc->maxcols > 4) { - for (unsigned int j = 0; j < 3; j++) - lpc->linebuf[lpc->maxcols-j-1] = '.'; - lpc->linebuf[lpc->maxcols] = '\0'; + lpc->linebuf[lpc->maxcols - 4] = '.'; + lpc->linebuf[lpc->maxcols - 3] = '.'; + lpc->linebuf[lpc->maxcols - 2] = '.'; } puts(lpc->linebuf);