libgweather r33 - in trunk: . libgweather



Author: matthiasc
Date: Sat Jan 12 02:22:51 2008
New Revision: 33
URL: http://svn.gnome.org/viewvc/libgweather?rev=33&view=rev

Log:
Fix inverted logic


Modified:
   trunk/ChangeLog
   trunk/libgweather/gweather-prefs.c

Modified: trunk/libgweather/gweather-prefs.c
==============================================================================
--- trunk/libgweather/gweather-prefs.c	(original)
+++ trunk/libgweather/gweather-prefs.c	Sat Jan 12 02:22:51 2008
@@ -338,7 +338,7 @@
 static const char *
 get_translated_unit (int unit, GConfEnumStringPair *pairs, int min_value, int max_value)
 {
-    g_return_val_if_fail (unit < min_value || unit > max_value, NULL);
+    g_return_val_if_fail (unit >= min_value && unit <= max_value, NULL);
 
     return _(pairs[unit - 1].str); /* minus 1 because enum value 0 is for "invalid" (look at weather.h) */
 }



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