changeset 3522:23bf72b8c95c trunk

tuple_formatter_expression_empty() was fundamentally broken, fixed.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 12 Sep 2007 23:19:46 +0300
parents 2f5ef443b231
children 56e2a8704164 4f54b90fc2ed
files src/audacious/tuple_formatter.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple_formatter.c	Wed Sep 12 17:55:44 2007 +0300
+++ b/src/audacious/tuple_formatter.c	Wed Sep 12 23:19:46 2007 +0300
@@ -465,10 +465,12 @@
     if (type == TUPLE_UNKNOWN)
         return TRUE;
 
-    if (type == TUPLE_INT && tuple_get_int(tuple, -1, expression) != 0)
-        return FALSE;
+    if (type == TUPLE_INT)
+        return (tuple_get_int(tuple, -1, expression) == 0);
 
     iter = tuple_get_string(tuple, -1, expression);
+    if (!iter)
+        return TRUE;
 
     while (ret && *iter != '\0')
     {