diff options
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 5 | ||||
-rw-r--r-- | manual/appendix/wps_tags.tex | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 29ddad4c5b..1bb5b8e555 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -927,7 +927,10 @@ const char *get_token_value(struct gui_wps *gwps, | |||
927 | if (utf8_len < ss->start) | 927 | if (utf8_len < ss->start) |
928 | return NULL; | 928 | return NULL; |
929 | 929 | ||
930 | start_byte = utf8seek(token_val, ss->start); | 930 | if (ss->start < 0) |
931 | start_byte = utf8seek(token_val, ss->start + utf8_len); | ||
932 | else | ||
933 | start_byte = utf8seek(token_val, ss->start); | ||
931 | 934 | ||
932 | if (ss->length < 0 || (ss->start + ss->length) > utf8_len) | 935 | if (ss->length < 0 || (ss->start + ss->length) > utf8_len) |
933 | end_byte = strlen(token_val); | 936 | end_byte = strlen(token_val); |
diff --git a/manual/appendix/wps_tags.tex b/manual/appendix/wps_tags.tex index 4aa9472e74..51f10e9a32 100644 --- a/manual/appendix/wps_tags.tex +++ b/manual/appendix/wps_tags.tex | |||
@@ -766,7 +766,7 @@ a horizontal progressbar which doesn't fill and draws the image | |||
766 | \end{tagmap} | 766 | \end{tagmap} |
767 | Use this tag to get a substring from another tag. | 767 | Use this tag to get a substring from another tag. |
768 | \begin{description} | 768 | \begin{description} |
769 | \item[start] -- first character to take (0 being the start of the string) | 769 | \item[start] -- first character to take (0 being the start of the string, negative means from the end of the string) |
770 | \item[length] -- length of the substring to return (- for the rest of the string) | 770 | \item[length] -- length of the substring to return (- for the rest of the string) |
771 | \item[tag] -- tag to get | 771 | \item[tag] -- tag to get |
772 | \item[number] -- OPTIONAL. if this is present it will assume the | 772 | \item[number] -- OPTIONAL. if this is present it will assume the |