summaryrefslogtreecommitdiff
path: root/src/lib/eina_stringshare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina_stringshare.c')
-rw-r--r--src/lib/eina_stringshare.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eina_stringshare.c b/src/lib/eina_stringshare.c
index 5c4b6f8..49a24f4 100644
--- a/src/lib/eina_stringshare.c
+++ b/src/lib/eina_stringshare.c
@@ -657,7 +657,9 @@ eina_stringshare_add_length(const char *str, unsigned int slen)
657{ 657{
658 DBG("str=%p (%.*s), slen=%u", str, slen, str ? str : "", slen); 658 DBG("str=%p (%.*s), slen=%u", str, slen, str ? str : "", slen);
659 659
660 if ((!str) || (slen <= 0)) 660 if (!str)
661 return NULL;
662 else if (slen == 0))
661 return NULL; 663 return NULL;
662 else if (slen == 1) 664 else if (slen == 1)
663 return (const char *)_eina_stringshare_single + ((*str) << 1); 665 return (const char *)_eina_stringshare_single + ((*str) << 1);