comparison decoders/timidity/timidity.c @ 254:a73c51c12452

Memory access fixes.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 11 Feb 2002 07:04:06 +0000
parents e122de403a2d
children 3da217bd0e48
comparison
equal deleted inserted replaced
253:6e1ee1f5be1b 254:a73c51c12452
444 for (i = 0; i < 128; i++) 444 for (i = 0; i < 128; i++)
445 { 445 {
446 if (master_tonebank[i]) 446 if (master_tonebank[i])
447 { 447 {
448 song->tonebank[i] = safe_malloc(sizeof(ToneBank)); 448 song->tonebank[i] = safe_malloc(sizeof(ToneBank));
449 memset(song->tonebank[i], 0, sizeof(ToneBank));
449 song->tonebank[i]->tone = master_tonebank[i]->tone; 450 song->tonebank[i]->tone = master_tonebank[i]->tone;
450 } 451 }
451 if (master_drumset[i]) 452 if (master_drumset[i])
452 { 453 {
453 song->drumset[i] = safe_malloc(sizeof(ToneBank)); 454 song->drumset[i] = safe_malloc(sizeof(ToneBank));
455 memset(song->drumset[i], 0, sizeof(ToneBank));
454 song->drumset[i]->tone = master_drumset[i]->tone; 456 song->drumset[i]->tone = master_drumset[i]->tone;
455 } 457 }
456 } 458 }
457 459
458 song->amplification = DEFAULT_AMPLIFICATION; 460 song->amplification = DEFAULT_AMPLIFICATION;