fixed a possible issue in wind direction fetch

This commit is contained in:
strawmanbobi
2019-11-18 22:53:31 +08:00
parent 4c299ee94c
commit 94796b459d

View File

@@ -581,6 +581,9 @@ INT8 get_supported_wind_direction(UINT8 *supported_wind_direction)
if (NULL != context)
{
*supported_wind_direction = (UINT8) (context->si.mode_count - 1);
if (*supported_wind_direction < 0) {
*supported_wind_direction = 0;
}
return IR_DECODE_SUCCEEDED;
}
else