Remove use of non-standard function strdup

Related to #873.
This commit is contained in:
Camilla Löwy
2018-01-17 11:56:35 +01:00
parent bb3ab87a18
commit 973bf29622
11 changed files with 29 additions and 19 deletions
+1 -1
View File
@@ -398,7 +398,7 @@ _GLFWjoystick* _glfwAllocJoystick(const char* name,
js = _glfw.joysticks + jid;
js->present = GLFW_TRUE;
js->name = strdup(name);
js->name = _glfw_strdup(name);
js->axes = calloc(axisCount, sizeof(float));
js->buttons = calloc(buttonCount + hatCount * 4, 1);
js->hats = calloc(hatCount, 1);