Fix/commit FS#10595. A (sub)line could be part of the previous viewport due to a off-by-one bug in the indexing.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22662 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-09-08 16:34:51 +00:00
parent e2ccabf89d
commit 1f10f99dc0

View file

@ -668,7 +668,7 @@ static int parse_viewport(const char *wps_bufptr,
skin_vp->pb = NULL; skin_vp->pb = NULL;
skin_vp->lines = NULL; skin_vp->lines = NULL;
if (curr_line) 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; curr_line = NULL;
if (!skin_start_new_line(skin_vp, wps_data->num_tokens)) if (!skin_start_new_line(skin_vp, wps_data->num_tokens))
return WPS_ERROR_INVALID_PARAM; return WPS_ERROR_INVALID_PARAM;