the second parameter should not be hardcoded as 1.  You want `sizeof (gchar)` there.