Do not remap framework assembly if it's version is higher than the runtime version
[mono.git] / eglib / src / gstr.c
index 0f66a43372e96e0f2ad6db4ac0ec3ef76290ecd6..3e976c5a2edfe3019a294daad9f45d355f7da250 100644 (file)
@@ -32,6 +32,8 @@
 #include <ctype.h>
 #include <glib.h>
 
+#include "vasprintf.h"
+
 /* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
 gchar *
 g_strndup (const gchar *str, gsize n)
@@ -251,8 +253,12 @@ g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens)
        }
 
        if (*string) {
-               /* Add the rest of the string as the last element */
-               add_to_vector (&vector, size, g_strdup (string));
+               if (strcmp (string, delimiter) == 0)
+                       add_to_vector (&vector, size, g_strdup (""));
+               else {
+                       /* Add the rest of the string as the last element */
+                       add_to_vector (&vector, size, g_strdup (string));
+               }
                size++;
        }