From baf36f72baa2095b92b298fd45d9cbb522cdca87 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 22 Apr 2013 16:18:03 +0800 Subject: Bug 859315: lots of "Lock wait timeout exceeded" errors when updating cf_crash_signature --- Bugzilla/Util.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index e8d1438f3..e12882215 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -477,11 +477,11 @@ sub find_wrap_point { if (!$string) { return 0 } if (length($string) < $maxpos) { return length($string) } my $wrappoint = rindex($string, ",", $maxpos); # look for comma - if ($wrappoint < 0) { # can't find comma + if ($wrappoint <= 0) { # can't find comma $wrappoint = rindex($string, " ", $maxpos); # look for space - if ($wrappoint < 0) { # can't find space + if ($wrappoint <= 0) { # can't find space $wrappoint = rindex($string, "-", $maxpos); # look for hyphen - if ($wrappoint < 0) { # can't find hyphen + if ($wrappoint <= 0) { # can't find hyphen $wrappoint = $maxpos; # just truncate it } else { $wrappoint++; # leave hyphen on the left side -- cgit v1.2.3-24-g4f1b