patch-1.3.69 linux/drivers/sound/gus_wave.c

Next file: linux/drivers/sound/hex2hex.h
Previous file: linux/drivers/sound/gus_card.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.68/linux/drivers/sound/gus_wave.c linux/drivers/sound/gus_wave.c
@@ -941,7 +941,7 @@
   sample_no = patch_table[instr_no];
   patch_map[voice] = -1;
 
-  if (sample_no < 0)
+  if (sample_no == NOT_SAMPLE)
     {
       printk ("GUS: Undefined patch %d for voice %d\n", instr_no, voice);
       return -EINVAL;		/* Patch not defined */
@@ -2557,7 +2557,7 @@
 
 	  rec->data.data8[i] = 0;
 
-	  while (ptr >= 0 && ptr < free_sample)
+	  while (ptr >= 0 && ptr < free_sample && ptr != NOT_SAMPLE)
 	    {
 	      rec->data.data8[i]++;
 	      ptr = samples[ptr].key;	/* Follow link */
@@ -2572,7 +2572,7 @@
 
 	n = 0;
 
-	while (ptr >= 0 && ptr < free_sample)
+	while (ptr >= 0 && ptr < free_sample && ptr != NOT_SAMPLE)
 	  {
 	    rec->data.data32[n++] = ptr;
 	    ptr = samples[ptr].key;	/* Follow link */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this