[hackers] [dmenu] fixed a problem when backporting dwm's drawtext() || Anselm R Garbe

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

changeset: 276:ff9c781ca7d9
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Mon Aug 18 19:24:29 2008 +0100
files: dmenu.c
description:
fixed a problem when backporting dwm's drawtext()

diff -r be53735b7219 -r ff9c781ca7d9 dmenu.c
--- a/dmenu.c Mon Aug 18 10:20:53 2008 +0100
+++ b/dmenu.c Mon Aug 18 19:24:29 2008 +0100
@@ -226,7 +226,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:24:35 UTC

This archive was generated by hypermail 2.2.0 : Mon Aug 18 2008 - 18:36:10 UTC