summaryrefslogtreecommitdiff
path: root/src/scanner.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/scanner.vala')
-rw-r--r--src/scanner.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scanner.vala b/src/scanner.vala
index 371fe83..8a8c6f6 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -467,6 +467,8 @@ public class Scanner
private bool set_string_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, string value, out string result)
{
+ result = "";
+
return_val_if_fail (option.type == Sane.ValueType.STRING, false);
var s = new char[option.size];
@@ -499,6 +501,7 @@ public class Scanner
return set_string_option (handle, option, option_index, values[i], out result);
}
+ result = "";
return false;
}
@@ -1198,7 +1201,7 @@ public class Scanner
if (status == Sane.Status.EOF)
{
if (parameters.lines > 0 && line_count != parameters.lines)
- warning ("Scan completed with %d lines, expected %d lines", parameters.lines, parameters.lines);
+ warning ("Scan completed with %d lines, expected %d lines", line_count, parameters.lines);
if (n_used > 0)
warning ("Scan complete with %d bytes of unused data", n_used);
do_complete_page ();