]> git.imager.perl.org - imager.git/blobdiff - Imager.pm
break out of the search loop early when we find the right utf8 code
[imager.git] / Imager.pm
index 1259c187869210aea369a7e1d9ce850056e01b95..de0744765257c9d6b4f1d77e681642f91ae20b79 100644 (file)
--- a/Imager.pm
+++ b/Imager.pm
@@ -3254,7 +3254,7 @@ sub string {
   unless ($self->{IMG}) { $self->{ERRSTR}='empty input image'; return undef; }
 
   my %input=('x'=>0, 'y'=>0, @_);
-  $input{string}||=$input{text};
+  defined($input{string}) or $input{string} = $input{text};
 
   unless(defined $input{string}) {
     $self->{ERRSTR}="missing required parameter 'string'";