Remote name buffer should be a char array

This commit is contained in:
Kristian Lauszus 2014-01-16 18:56:42 +01:00
parent 2e4f9c852d
commit 0c05413447
2 changed files with 2 additions and 5 deletions

View file

@ -796,11 +796,8 @@ void BTD::HCI_task() {
if(hci_check_flag(HCI_FLAG_REMOTE_NAME_COMPLETE)) {
#ifdef DEBUG_USB_HOST
Notify(PSTR("\r\nRemote Name: "), 0x80);
for(uint8_t i = 0; i < 30; i++) {
if(remote_name[i] == '\0') // End of string
break;
for(uint8_t i = 0; i < strlen(remote_name); i++)
Notifyc(remote_name[i], 0x80);
}
#endif
if(strncmp((const char*)remote_name, "Nintendo", 8) == 0) {
incomingWii = true;

2
BTD.h
View file

@ -488,7 +488,7 @@ public:
/** Last incoming devices Bluetooth address. */
uint8_t disc_bdaddr[6];
/** First 30 chars of last remote name. */
uint8_t remote_name[30];
char remote_name[30];
/**
* The supported HCI Version read from the Bluetooth dongle.
* Used by the PS3BT library to check the HCI Version of the Bluetooth dongle,