[hackers] [dwm] fixed error I did when applying Martin Hurton's drawtext patch || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Mon, 18 Aug 2008 18:23:26 +0000 (UTC)

changeset: 1336:6ed902a28221
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Mon Aug 18 19:23:03 2008 +0100
files: dwm.c
description:
fixed error I did when applying Martin Hurton's drawtext patch

diff -r 83da51dfedd3 -r 6ed902a28221 dwm.c
--- a/dwm.c Mon Aug 18 19:19:15 2008 +0100
+++ b/dwm.c Mon Aug 18 19:23:03 2008 +0100
@@ -581,7 +581,7 @@
         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);
Received on Mon Aug 18 2008 - 18:23:26 UTC

This archive was generated by hypermail 2.2.0 : Mon Aug 18 2008 - 18:24:06 UTC