[gvfs] Fix creating mount_spec from string



commit 80dbd15b64ec4907f1041692c23af6b90ad305ca
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Thu Oct 8 15:48:15 2009 +0200

    Fix creating mount_spec from string
    
    Don't consume the ending character.

 common/gmountspec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/common/gmountspec.c b/common/gmountspec.c
index c55f996..1a9a60a 100644
--- a/common/gmountspec.c
+++ b/common/gmountspec.c
@@ -514,7 +514,7 @@ g_mount_spec_new_from_string (const gchar     *str,
   if (colon)
     {
       item.key = g_strdup ("type");
-      item.value = g_strndup (str, colon - str - 1);
+      item.value = g_strndup (str, colon - str);
       g_array_append_val (items, item);
       str = colon + 1;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]