src/strip.vala
authorAlan Knowles <alan@roojs.com>
Fri, 29 Jun 2018 08:16:10 +0000 (16:16 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 29 Jun 2018 08:16:10 +0000 (16:16 +0800)
src/strip.vala

index 4223b03..cb3e2c7 100644 (file)
@@ -715,7 +715,9 @@ public class Strip : GLib.Object {
                                Posix.exit(1);
                }
                
-
+               if (need_return == -1) {
+                       return '';
+               }
         var rs = mysql.use_result();
         
         //GLib.debug("got %d rows", (int) rs.num_rows());
@@ -728,7 +730,7 @@ public class Strip : GLib.Object {
                        ret = row[0];
                
                }
-               if (!need_return) {
+               if (need_return == 0) {
                if (StripApplication.opt_debug_sql) {
                                GLib.debug("got %s", got_row ? "=Nothing=" : ret);
                        }