Revision
75588
Author
jmr@macports.org
Date
2011-01-31 12:30:24 -0800 (Mon, 31 Jan 2011)

Log Message

xmgr: fix 64-bit crash (#22468)

Modified Paths

Added Paths

Diff

Modified: trunk/dports/math/xmgr/Portfile (75587 => 75588)


--- trunk/dports/math/xmgr/Portfile	2011-01-31 19:49:27 UTC (rev 75587)
+++ trunk/dports/math/xmgr/Portfile	2011-01-31 20:30:24 UTC (rev 75588)
@@ -16,8 +16,7 @@
 
 homepage            http://plasma-gate.weizmann.ac.il/Xmgr/
 platforms           darwin
-supported_archs     i386 ppc
-patchfiles          patch-main.c
+patchfiles          patch-main.c patch-motifutils.c
 fetch.use_epsv      no
 master_sites        ftp://plasma-gate.weizmann.ac.il/pub/xmgr4/src \
                     ftp://wauug.erols.com/pub/X-Windows/xmgr4/src \

Added: trunk/dports/math/xmgr/files/patch-motifutils.c (0 => 75588)


--- trunk/dports/math/xmgr/files/patch-motifutils.c	                        (rev 0)
+++ trunk/dports/math/xmgr/files/patch-motifutils.c	2011-01-31 20:30:24 UTC (rev 75588)
@@ -0,0 +1,11 @@
+--- src/motifutils.c	2011-01-30 19:39:41.000000000 +0100
++++ src/motifutils.c	2011-01-30 19:39:47.000000000 +0100
+@@ -121,7 +121,7 @@
+ 
+     i = 0;
+     va_start(var, nchoices);
+-    while ((s = va_arg(var, char *)) != NULL) {
++    while ((s = va_arg(var, char *)) != NULL && i<nchoices) {
+ 	retval[i + 2] = XmCreatePushButton(retval[1], s, NULL, 0);
+ 	i++;
+     }