mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
nsf: Don't write further than the limits of the table (size is 75, as defined in the header)
gcc 4.3.3 found this one, I'm impressed.
This commit is contained in:
parent
922e6428f6
commit
38d3b76d1b
1 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
/*#include "driver.h" *//* use M.A.M.E. */
|
||||
/*#include "driver.h" */
|
||||
/* use M.A.M.E. */
|
||||
#include "fmopl.h"
|
||||
#include <math.h>
|
||||
|
||||
|
@ -594,7 +595,7 @@ init_timetables (FM_OPL * OPL, int ARRATE, int DRRATE)
|
|||
OPL->AR_TABLE[i] = (INT32) (rate / ARRATE);
|
||||
OPL->DR_TABLE[i] = (INT32) (rate / DRRATE);
|
||||
}
|
||||
for (i = 60; i < 76; i++) {
|
||||
for (i = 60; i < 75; i++) {
|
||||
OPL->AR_TABLE[i] = EG_AED - 1;
|
||||
OPL->DR_TABLE[i] = OPL->DR_TABLE[60];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue