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;