summaryrefslogtreecommitdiff
path: root/audio/mpg123/patches/patch-an
blob: 510cd68a151ddfe330ffe8018d52547020a64ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-an,v 1.1 2002/02/27 21:37:41 martin Exp $

--- getlopt.c.orig	Tue Dec  8 10:41:11 1998
+++ getlopt.c	Wed Feb 27 22:29:57 2002
@@ -45,10 +45,12 @@
 
 	if (!(opt->flags & 1)) { /* doesn't take argument */
 		if (opt->var) {
-			if (opt->flags & 2) /* var is *char */
+			if (opt->flags & GLO_CHAR) /* var is *char */
 				*((char *) opt->var) = (char) opt->value;
-			else
+			else if (opt->flags & GLO_LONG)	/* var is *long */
 				*((long *) opt->var) = opt->value;
+			else	/* var is *int */
+				*((int *) opt->var) = opt->value;
 		}
 		else
 			result = opt->value ? opt->value : opt->sname;