fixed allocation

This commit is contained in:
aap 2020-06-06 11:26:49 +02:00
parent 6ff378bb16
commit 8b07204abb

View File

@ -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;