Skip to content

Commit

Permalink
Remote name buffer should be a char array
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauszus committed Jan 16, 2014
1 parent 2e4f9c8 commit 0c05413
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions BTD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion BTD.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ class BTD : public USBDeviceConfig, public UsbConfigXtracter {
/** 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,
Expand Down

0 comments on commit 0c05413

Please sign in to comment.