diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index a6d595db53..c23f55c111 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -668,7 +668,7 @@ static int parse_viewport(const char *wps_bufptr, skin_vp->pb = NULL; skin_vp->lines = NULL; if (curr_line) - curr_line->curr_subline->last_token_idx = wps_data->num_tokens; + curr_line->curr_subline->last_token_idx = wps_data->num_tokens - 1; curr_line = NULL; if (!skin_start_new_line(skin_vp, wps_data->num_tokens)) return WPS_ERROR_INVALID_PARAM;