9ae33e79196e8a46be05d7404c363408ccf9649e
[pkgsrc.git] / audio / csound4 / patches / patch-af
1 $NetBSD: patch-af,v 1.1 2005/11/09 06:35:25 ben Exp $
2
3 --- csound/soundin.c.orig       2005-04-10 02:43:07.000000000 -0700
4 +++ csound/soundin.c
5 @@ -204,7 +204,7 @@ int sndgetset(SOUNDIN *p)       /* core 
6               strsets[filno])
7        strcpy(soundiname, strsets[filno]);
8      else sprintf(soundiname,"soundin.%ld",filno);  /* soundin.filno */
9 -    if ((int) *p->skipinit != 0) {
10 +    if (p->skipinit != NULL && (int) *p->skipinit != 0) {
11        if (strcmp(p->sfname,soundiname)) {
12          printf("error: cannot tie to a new soundfile\n");
13            return -1;
14 @@ -909,7 +909,7 @@ void sndinset(SOUNDIN *p)    /* init rou
15      if (p->fdch.fd) {   /* if file already open, close it */
16            /* RWD: it is not safe to assume all compilers init this to 0 */
17            /* (IV: but it is allocated with mcalloc...) */
18 -      if ((int) *p->skipinit == 0) {
19 +      if (p->skipinit != NULL && (int) *p->skipinit == 0) {
20          /* reload the file */
21          reinit++; close(p->fdch.fd);
22        }