From 38d3b76d1b779527371e1750082b561e3c07239b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 28 Feb 2009 11:43:56 +0100 Subject: [PATCH] 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. --- gst/nsf/fmopl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/nsf/fmopl.c b/gst/nsf/fmopl.c index 6e71e5b681..88b89ad626 100644 --- a/gst/nsf/fmopl.c +++ b/gst/nsf/fmopl.c @@ -18,7 +18,8 @@ #include #include #include - /*#include "driver.h" *//* use M.A.M.E. */ +/*#include "driver.h" */ +/* use M.A.M.E. */ #include "fmopl.h" #include @@ -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]; } -- 2.34.1