Skip to content

Commit

Permalink
printer_exists is missing return statement
Browse files Browse the repository at this point in the history
I'm guessing that it only functioned due to how gcc compiled it.  When
compiled with clang, renders library unusable due to every call
raising "The printer or destination doesn't exist!"
  • Loading branch information
nathanstitt committed Jul 7, 2013
1 parent ecde1c9 commit 8f7cdad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/cups.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int printer_exists(VALUE printer){
// First call Cups#show_destinations
VALUE dest_list = rb_funcall(rubyCups, rb_intern("show_destinations"), 0);
// Then check the printer arg is included in the returned array...
rb_ary_includes(dest_list, printer) ? 1 : 0;
return rb_ary_includes(dest_list, printer) ? 1 : 0;
}

/*
Expand Down

0 comments on commit 8f7cdad

Please sign in to comment.