You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method _FindWiimotes(WiimoteType type) at line 43 initializes a variable called found to be false, and returns the variable without assigning to it.
The variable found should be assigned true at line 86 within the scope of the if (remote == null) statement.
Note: if this is corrected, it will introduce a bug at line 39 in FindWiimotes.
The call to _FindWiimote in the statement "ret = ret || _FindWiimotes(WiimoteType.WIIMOTEPLUS" will only be executed if the value of ret is false (which it always is, erroneously).
The code in FindWiimotes() should be something like
Method _FindWiimotes(WiimoteType type) at line 43 initializes a variable called found to be false, and returns the variable without assigning to it.
The variable found should be assigned true at line 86 within the scope of the if (remote == null) statement.
Note: if this is corrected, it will introduce a bug at line 39 in FindWiimotes.
The call to _FindWiimote in the statement "ret = ret || _FindWiimotes(WiimoteType.WIIMOTEPLUS" will only be executed if the value of ret is false (which it always is, erroneously).
The code in FindWiimotes() should be something like
bool ret1 = _FindWiimotes(WiimoteType.WIIMOTE);
bool ret2 = _FindWiimotes(WiimoteType.WIIMOTEPLUS);
return ret1 || ret2;
The text was updated successfully, but these errors were encountered: