*/
/*
- * Modified by Jinrong Xie (stonexjr@gmail.com) 12/24/2014
+ * Modified by Jinrong Xie <stonexjr at gmail.com> 12/24/2014
* for Space Navigator support on Windows.
* This code is enhanced by at least supporting 3Dconnexion's
* six degree of freedom navigator.
*/
#include <GL/freeglut.h>
+#include <stdlib.h>
#include "../fg_internal.h"
enum {
if (res == -1)
return;
- rawInputBuffer = (BYTE*)malloc(size);
+ rawInputBuffer = malloc(size * sizeof *rawInputBuffer);
pRawInput = (PRAWINPUT)rawInputBuffer;
res = GetRawInputData(hRawInput, RID_INPUT, pRawInput, &size, sizeof(RAWINPUTHEADER));