summaryrefslogtreecommitdiff
path: root/legacy/evas
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-10-10 07:23:45 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-10-10 07:23:45 +0000
commit94869b2f9594dd9fa6c82a3bc670e959ac9eb169 (patch)
treecefa4ccc8155c02e4fe7cfbe325a1ab54ff6c499 /legacy/evas
parente0af0dca6d587dd2c81fa7b7f0bc80166107d232 (diff)
evas: don't use strcmp for just one character, when we already have line size information.
SVN revision: 77703
Diffstat (limited to 'legacy/evas')
-rw-r--r--legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c b/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
index 24a5b06cd8..d8b68189f7 100644
--- a/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
+++ b/legacy/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
@@ -308,10 +308,10 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN
308 sscanf(&line[k], "%255s", s); 308 sscanf(&line[k], "%255s", s);
309 slen = strlen(s); 309 slen = strlen(s);
310 k += slen; 310 k += slen;
311 if (!strcmp(s, "c")) iscolor = 1; 311 if (slen == 1 && *s == 'c') iscolor = 1;
312 if ((!strcmp(s, "m")) || (!strcmp(s, "s")) 312 if ((slen == 1 && ((s[0] == 'm') || (s[0] == 's') || (s[0] == 'g')) || (s[0] == 'c')) ||
313 || (!strcmp(s, "g4")) || (!strcmp(s, "g")) 313 (slen == 2 && (s[0] == 'g') && (s[0] == '4')) ||
314 || (!strcmp(s, "c")) || (k >= len)) 314 (k >= len))
315 { 315 {
316 if (k >= len) 316 if (k >= len)
317 { 317 {