[Settings] show_setting() functions return snprintf()-style length.
[people/mcb30/gpxe.git] / src / hci / tui / settings_ui.c
index 336af4e..c6261c7 100644 (file)
@@ -118,7 +118,7 @@ static void load_setting ( struct setting_widget *widget ) {
 
        /* Read current setting value */
        if ( show_setting ( widget->context, widget->setting,
-                           widget->value, sizeof ( widget->value ) ) != 0 ) {
+                           widget->value, sizeof ( widget->value ) ) < 0 ) {
                widget->value[0] = '\0';
        }