[gimp] libgimpconfig: unfix loop condition and fix if condition



commit cf3e7bc40b7a2312d6acef76aed1b69b7a96106b
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Wed Oct 29 22:14:29 2014 +0100

    libgimpconfig: unfix loop condition and fix if condition
    
    The loop was right, but the following if was meant to check if
    the token was terminated correctly so it needs to be *p.

 libgimpconfig/gimpconfig-path.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgimpconfig/gimpconfig-path.c b/libgimpconfig/gimpconfig-path.c
index ab5aea2..6067e85 100644
--- a/libgimpconfig/gimpconfig-path.c
+++ b/libgimpconfig/gimpconfig-path.c
@@ -522,10 +522,10 @@ gimp_config_path_extract_token (const gchar **str)
 
   p = *str + 2;
 
-  while (p && (*p != '}'))
+  while (*p && (*p != '}'))
     p = g_utf8_next_char (p);
 
-  if (!p)
+  if (! *p)
     return NULL;
 
   token = g_strndup (*str + 2, g_utf8_pointer_to_offset (*str + 2, p));


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