[dw-free] avoid uninitialized warnings in ljtextutil.pl
[commit: http://hg.dwscoalition.org/dw-free/rev/0ba86eefb2b0]
http://bugs.dwscoalition.org/show_bug.cgi?id=3323
Do the check in the other order to avoid warnings.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3323
Do the check in the other order to avoid warnings.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/ljtextutil.pl
-------------------------------------------------------------------------------- diff -r 29a8d7e6fef1 -r 0ba86eefb2b0 cgi-bin/ljtextutil.pl --- a/cgi-bin/ljtextutil.pl Fri Dec 10 18:21:49 2010 +0800 +++ b/cgi-bin/ljtextutil.pl Fri Dec 10 18:25:45 2010 +0800 @@ -451,7 +451,7 @@ sub text_trim while ($text =~ m/$utf_char/gco) { last unless $char_max; - last if $cur + length($1) > $byte_max and $byte_max; + last if $byte_max and $cur + length($1) > $byte_max; $cur += length($1); $char_max--; } --------------------------------------------------------------------------------