[gupnp-av] 1 and 0 are valid boolean values, too



commit fbb701690b47abfbc6f4e27b4bda736aa050fd92
Author: Jens Georg <mail jensge org>
Date:   Thu Jun 16 22:00:55 2011 +0200

    1 and 0 are valid boolean values, too

 libgupnp-av/xml-util.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp-av/xml-util.c b/libgupnp-av/xml-util.c
index 3f8bca3..d25da7a 100644
--- a/libgupnp-av/xml-util.c
+++ b/libgupnp-av/xml-util.c
@@ -229,6 +229,8 @@ xml_util_verify_attribute_is_boolean (xmlNode    *node,
         return g_ascii_strcasecmp (str, "true") == 0 ||
                g_ascii_strcasecmp (str, "yes") == 0 ||
                g_ascii_strcasecmp (str, "false") == 0 ||
-               g_ascii_strcasecmp (str, "no") == 0;
+               g_ascii_strcasecmp (str, "no") == 0 ||
+               g_ascii_strcasecmp (str, "0") == 0 ||
+               g_ascii_strcasecmp (str, "1") == 0;
 }
 



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