DriverStation::GetJoystickName(): Make work for stick>0.

Change-Id: I1c62742cf8b80c81d21c2198f966c8151a758a01
This commit is contained in:
Peter Johnson
2016-01-15 10:45:20 -08:00
parent 6adf4c48cd
commit 8801568325

View File

@@ -159,7 +159,7 @@ std::string DriverStation::GetJoystickName(uint32_t stick) const {
if (stick >= kJoystickPorts) {
wpi_setWPIError(BadJoystickIndex);
}
std::string retVal(m_joystickDescriptor[0].name);
std::string retVal(m_joystickDescriptor[stick].name);
return retVal;
}