From 7878b046d66a77fa8d97ec3149985630dfde50b7 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 11 Nov 2010 01:56:44 -0600 Subject: [PATCH] fix compile error on windows this is C not C++ --- src/wiiboard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wiiboard.c b/src/wiiboard.c index 94ac71d..8c24983 100644 --- a/src/wiiboard.c +++ b/src/wiiboard.c @@ -68,6 +68,8 @@ static uint16_t big_to_lil(uint16_t num) int wii_board_handshake(struct wiimote_t* wm, struct wii_board_t* wb, byte* data, uint16_t len) { int i; + uint16_t *handshake_short; + /* decrypt data */ printf("DECRYPTED DATA WIIBOARD\n"); for (i = 0; i < len; ++i) @@ -83,7 +85,7 @@ int wii_board_handshake(struct wiimote_t* wm, struct wii_board_t* wb, byte* data } printf("\n"); - uint16_t *handshake_short = (uint16_t*)data; + handshake_short = (uint16_t*)data; wb->ctr[0] = big_to_lil(handshake_short[2]); wb->cbr[0] = big_to_lil(handshake_short[3]);