summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xdpyinfo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xdpyinfo.c b/xdpyinfo.c
index c37d7e8..093b7c1 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -1425,12 +1425,15 @@ print_known_extensions(FILE *f)
int i, col;
for (i = 0, col = 6; i < num_known_extensions; i++)
{
- if ((col += strlen(known_extensions[i].extname)+1) > 79)
+ int extlen = strlen(known_extensions[i].extname) + 1;
+
+ if ((col + extlen) > 79)
{
col = 6;
fprintf(f, "\n ");
}
fprintf(f, "%s ", known_extensions[i].extname);
+ col += extlen;
}
}