Fix a coredump bug. Reported by Brian de Alwis in PR 24416.

This commit is contained in:
wiz 2005-03-17 15:49:54 +00:00
parent d7b95a192c
commit c500881ded
3 changed files with 21 additions and 3 deletions

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.9 2004/10/03 00:18:29 tv Exp $
# $NetBSD: Makefile,v 1.10 2005/03/17 15:49:54 wiz Exp $
#
DISTNAME= fspanel-0.8beta1
PKGNAME= ${DISTNAME:C/beta/.0./}
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= x11
MASTER_SITES= http://www.chatjunkies.org/fspanel/

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.4 2005/02/23 17:36:10 wiz Exp $
$NetBSD: distinfo,v 1.5 2005/03/17 15:49:54 wiz Exp $
SHA1 (fspanel-0.8beta1.tar.gz) = 80225c1cd6984b458e487db3cbc04d8e3a4173d8
RMD160 (fspanel-0.8beta1.tar.gz) = e892f182375e8a8541a01e6f3015f7fa4900c009
Size (fspanel-0.8beta1.tar.gz) = 9703 bytes
SHA1 (patch-aa) = 8a61200ff8ef1c05b78ed4bb1a9150c52a95b5e5
SHA1 (patch-ab) = 705eaaf0730e3afc0b0285aa3d8c4c2705e02326

View file

@ -0,0 +1,17 @@
$NetBSD: patch-ab,v 1.1 2005/03/17 15:49:54 wiz Exp $
--- fspanel.c.orig 2002-06-23 07:12:50.000000000 +0200
+++ fspanel.c
@@ -559,10 +559,10 @@ gui_draw_task (task *tk)
/* check how many chars can fit */
len = strlen (tk->name);
- while (1)
+ while (len > 0)
{
XftTextExtents8 (dd, xfs, tk->name, len, &ext);
- if (ext.width < taskw - (text_x - x) - 2 && len > 0)
+ if (ext.width < taskw - (text_x - x) - 2)
break;
len--;
}