1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

Replaced manual duplication with strdup.

This commit is contained in:
Camilla Berglund 2012-07-06 14:37:02 +02:00
parent 73622a2f3c
commit e188f6c4e1

View File

@ -53,9 +53,7 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current,
(*current)->physicalWidth = outputInfo->mm_width;
(*current)->physicalHeight = outputInfo->mm_height;
(*current)->name = malloc(strlen(outputInfo->name) + 1);
memcpy((*current)->name, outputInfo->name, strlen(outputInfo->name) + 1);
(*current)->name[strlen(outputInfo->name)] = '\0';
(*current)->name = strdup(outputInfo->name);
(*current)->screenX = crtcInfo->x;
(*current)->screenY = crtcInfo->y;