aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R Garbe2008-08-18 19:23:03 +0100
committerAnselm R Garbe2008-08-18 19:23:03 +0100
commit5cc7bec9d13514c3cc51b68923bad9973e8c3ddb (patch)
tree18ab002fd3ea62f4582117ef0c58646607ab655a
parent956173eb58028ca2697a9c74f8314e63e9bf0b21 (diff)
downloadaur-5cc7bec9d13514c3cc51b68923bad9973e8c3ddb.tar.gz
fixed error I did when applying Martin Hurton's drawtext patch
-rw-r--r--dwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 146d344d4978..9c0ebcfe18f2 100644
--- a/dwm.c
+++ b/dwm.c
@@ -581,7 +581,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
x = dc.x + (h / 2);
/* shorten text if necessary */
- for(len = MIN(olen, sizeof buf); len && textnw(buf, len) > dc.w - h; len--);
+ for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--);
if(!len)
return;
memcpy(buf, text, len);