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

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3209 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-11-11 18:15:14 +00:00
parent 0b49cf4449
commit 7009116b1a
2 changed files with 8 additions and 3 deletions

View File

@ -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>

View File

@ -297,9 +297,11 @@ const gchar *utils_get_eol_name(gint eol_mode)
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;
}