From 56aba3f98d17547433e55cd4122017c66b11b701 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 7 Sep 2011 10:42:06 -0500 Subject: [PATCH] cast malloc results --- src/io_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io_win.cpp b/src/io_win.cpp index 4f6aee0..2e7ea18 100644 --- a/src/io_win.cpp +++ b/src/io_win.cpp @@ -87,7 +87,7 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) { /* get the size of the data block required */ i = SetupDiGetDeviceInterfaceDetail(device_info, &device_data, NULL, 0, &len, NULL); - detail_data = malloc(len); + detail_data = (SP_DEVICE_INTERFACE_DETAIL_DATA_A*)malloc(len); detail_data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA); /* query the data for this device */