From 8b07204abbf3f1d1ae51d1025a6362a30166d1c9 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 6 Jun 2020 11:26:49 +0200 Subject: [PATCH] fixed allocation --- src/gl/gl3device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/gl3device.cpp b/src/gl/gl3device.cpp index 77be82b..3f01321 100644 --- a/src/gl/gl3device.cpp +++ b/src/gl/gl3device.cpp @@ -1236,7 +1236,7 @@ makeVideoModeList(void) modes = glfwGetVideoModes(glGlobals.monitor, &num); rwFree(glGlobals.modes); - glGlobals.modes = rwNewT(DisplayMode, num, ID_DRIVER | MEMDUR_EVENT); + glGlobals.modes = rwNewT(DisplayMode, num+1, ID_DRIVER | MEMDUR_EVENT); glGlobals.modes[0].mode = *glfwGetVideoMode(glGlobals.monitor); glGlobals.modes[0].flags = 0;