Fix use of sizeof in nmem_malloc call
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 19 Mar 2013 12:12:32 +0000 (13:12 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 19 Mar 2013 12:15:10 +0000 (13:15 +0100)
Now sizeof(char*) , rather than sizeof(char).

src/client.c

index 25f6505..c4ab916 100644 (file)
@@ -1703,7 +1703,7 @@ struct suggestions* client_suggestions_create(const char* suggestions_string)
                               &suggestions->num, 1, '\\', 0);
     /* Set up misspelled array */
     suggestions->misspelled = (char **)
-        nmem_malloc(nmem, suggestions->num * sizeof(**suggestions->misspelled));
+        nmem_malloc(nmem, suggestions->num * sizeof(*suggestions->misspelled));
     /* replace = with \0 .. for each item */
     for (i = 0; i < suggestions->num; i++)
     {