diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 805379152f..67411ed076 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c @@ -601,7 +601,7 @@ static int parse_viewport(const char *wps_bufptr, if (*(ptr+1) == '|') { char label = *(ptr+2); - if (label >= 'a' && label < 'a' + WPS_MAX_VIEWPORTS) + if (label >= 'a' && label <= 'z') { wps_data->viewports[wps_data->num_viewports].hidden_flags = VP_DRAW_HIDEABLE; wps_data->viewports[wps_data->num_viewports].label = label;