summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_stringshare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_stringshare.c')
-rw-r--r--src/lib/eina/eina_stringshare.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eina/eina_stringshare.c b/src/lib/eina/eina_stringshare.c
index 6d236c53c0..2a457f4736 100644
--- a/src/lib/eina/eina_stringshare.c
+++ b/src/lib/eina/eina_stringshare.c
@@ -611,8 +611,10 @@ eina_stringshare_del(Eina_Stringshare *str)
611EAPI Eina_Stringshare * 611EAPI Eina_Stringshare *
612eina_stringshare_add_length(const char *str, unsigned int slen) 612eina_stringshare_add_length(const char *str, unsigned int slen)
613{ 613{
614 if ((!str) || (slen <= 0)) 614 if (!str)
615 return NULL; 615 return NULL;
616 else if (slen == 0)
617 return "";
616 else if (slen == 1) 618 else if (slen == 1)
617 return (Eina_Stringshare *) _eina_stringshare_single + ((*str) << 1); 619 return (Eina_Stringshare *) _eina_stringshare_single + ((*str) << 1);
618 else if (slen < 4) 620 else if (slen < 4)