From ed306d3c4809cee3e35961091a01b2f2b7a8f751 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Mon, 15 Sep 2014 20:58:32 +0200 Subject: [PATCH] Fixed bad bug that would read outside buffer --- ogl_editor/src/TrackData.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogl_editor/src/TrackData.c b/ogl_editor/src/TrackData.c index d03e0c0..6e04fca 100644 --- a/ogl_editor/src/TrackData.c +++ b/ogl_editor/src/TrackData.c @@ -285,7 +285,7 @@ static int getPrevMark(const int* marks, int count, int row, int defValue) if (!marks) return defValue; - for (i = count; i >= 0; --i) + for (i = count - 1; i >= 0; --i) { const int v = marks[i];