fixed a possible issue in wind direction fetch
This commit is contained in:
@@ -581,6 +581,9 @@ INT8 get_supported_wind_direction(UINT8 *supported_wind_direction)
|
|||||||
if (NULL != context)
|
if (NULL != context)
|
||||||
{
|
{
|
||||||
*supported_wind_direction = (UINT8) (context->si.mode_count - 1);
|
*supported_wind_direction = (UINT8) (context->si.mode_count - 1);
|
||||||
|
if (*supported_wind_direction < 0) {
|
||||||
|
*supported_wind_direction = 0;
|
||||||
|
}
|
||||||
return IR_DECODE_SUCCEEDED;
|
return IR_DECODE_SUCCEEDED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user