ints!!! have found a case where.. yes. we have massive strings.. and shit

fucks-up badly! ints it is... 2gb of string - per string. that should be
enouhg for anybody! (also references went up to int too)



SVN revision: 45832
This commit is contained in:
Carsten Haitzler 2010-02-03 15:23:32 +00:00
parent c0baeaeb68
commit 75ea198b66
1 changed files with 3 additions and 3 deletions

View File

@ -140,8 +140,8 @@ struct _Eina_Stringshare_Node
EINA_MAGIC
unsigned short length;
unsigned short references;
unsigned int length;
unsigned int references;
char str[];
};
@ -1021,7 +1021,7 @@ eina_stringshare_add_length(const char *str, unsigned int slen)
_eina_stringshare_population_add(slen);
if (slen == 0)
if (slen <= 0)
return "";
else if (slen == 1)
return (const char *)_eina_stringshare_single + ((*str) << 1);