SF.net SVN: geany:[3209] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Nov 11 18:15:15 UTC 2008


Revision: 3209
          http://geany.svn.sourceforge.net/geany/?rev=3209&view=rev
Author:   eht16
Date:     2008-11-11 18:15:14 +0000 (Tue, 11 Nov 2008)

Log Message:
-----------
Evaluate only the strings 'TRUE' and 'true' to true in utils_atob(), any other string is treated as false.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-11-11 18:07:35 UTC (rev 3208)
+++ trunk/ChangeLog	2008-11-11 18:15:14 UTC (rev 3209)
@@ -6,6 +6,9 @@
  * plugins/export.c:
    Use 'utf8' as encoding package in the LaTeX template as it seems it
    is the most used version for UTF-8 support.
+ * src/utils.c:
+   Evaluate only the strings 'TRUE' and 'true' to true in utils_atob(),
+   any other string is treated as false.
 
 
 2008-11-11  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2008-11-11 18:07:35 UTC (rev 3208)
+++ trunk/src/utils.c	2008-11-11 18:15:14 UTC (rev 3209)
@@ -297,9 +297,11 @@
 
 gboolean utils_atob(const gchar *str)
 {
-	if (str == NULL) return FALSE;
-	else if (strcasecmp(str, "TRUE")) return FALSE;
-	else return TRUE;
+	if (str == NULL)
+		return FALSE;
+	else if (strcmp(str, "TRUE") == 0 || strcmp(str, "true") == 0)
+		return TRUE;
+	return FALSE;
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list