forked from enlightenment/efl
Evas textblock: Fixed format parsing to not be confused by single-quotes.
Before this commit, having a single quote anywhere in the format would mess up all of the format parsing. Thanks to MinSu Seo for reporting.
This commit is contained in:
parent
cc012b754c
commit
827885d794
|
@ -1,3 +1,7 @@
|
||||||
|
2013-06-25 Tom Hacohen
|
||||||
|
|
||||||
|
* Evas textblock: Fixed issue when parsing formats with quotes.
|
||||||
|
|
||||||
2013-06-28 Jiyoun Park
|
2013-06-28 Jiyoun Park
|
||||||
|
|
||||||
* Evas: Fix jpeg loader cannot deal with exif information correctly
|
* Evas: Fix jpeg loader cannot deal with exif information correctly
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -342,3 +342,4 @@ Fixes:
|
||||||
* Evas textblock: Fixed issue with textblocks without fonts segfaulting.
|
* Evas textblock: Fixed issue with textblocks without fonts segfaulting.
|
||||||
* Evas: Fix evas_common_convert_yuv_42* functions to actually return the converted data.
|
* Evas: Fix evas_common_convert_yuv_42* functions to actually return the converted data.
|
||||||
* Evas: Fix jpeg loader cannot deal with exif information correctly
|
* Evas: Fix jpeg loader cannot deal with exif information correctly
|
||||||
|
* Evas textblock: Fixed issue when parsing formats with quotes.
|
||||||
|
|
|
@ -2267,15 +2267,19 @@ _format_is_param(const char *item)
|
||||||
static void
|
static void
|
||||||
_format_param_parse(const char *item, const char **key, const char **val)
|
_format_param_parse(const char *item, const char **key, const char **val)
|
||||||
{
|
{
|
||||||
const char *start, *end, *quote;
|
const char *start, *end;
|
||||||
|
|
||||||
start = strchr(item, '=');
|
start = strchr(item, '=');
|
||||||
*key = eina_stringshare_add_length(item, start - item);
|
*key = eina_stringshare_add_length(item, start - item);
|
||||||
start++; /* Advance after the '=' */
|
start++; /* Advance after the '=' */
|
||||||
/* If we can find a quote, our new delimiter is a quote, not a space. */
|
/* If we can find a quote as the first non-space char,
|
||||||
if ((quote = strchr(start, '\'')))
|
* our new delimiter is a quote, not a space. */
|
||||||
|
while (*start == ' ')
|
||||||
|
start++;
|
||||||
|
|
||||||
|
if (*start == '\'')
|
||||||
{
|
{
|
||||||
start = quote + 1;
|
start++;
|
||||||
end = strchr(start, '\'');
|
end = strchr(start, '\'');
|
||||||
while ((end) && (end > start) && (end[-1] == '\\'))
|
while ((end) && (end > start) && (end[-1] == '\\'))
|
||||||
end = strchr(end + 1, '\'');
|
end = strchr(end + 1, '\'');
|
||||||
|
|
Loading…
Reference in New Issue