eina: fix strdup calloc, it's number of elements and then size, and not the other...
authortasn <tasn>
Sun, 8 Aug 2010 12:03:18 +0000 (12:03 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 8 Aug 2010 12:03:18 +0000 (12:03 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@50898 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_unicode.c

index 4ac49e3..50175eb 100644 (file)
@@ -116,7 +116,7 @@ eina_unicode_strdup(const Eina_Unicode *text)
    int len;
 
    len = eina_unicode_strlen(text);
-   ustr = (Eina_Unicode *)calloc(sizeof(Eina_Unicode), len + 1);
+   ustr = (Eina_Unicode *)calloc(len + 1, sizeof(Eina_Unicode));
    memcpy(ustr, text, len * sizeof(Eina_Unicode));
 
    return ustr;