summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-04-22 10:18:03 +0200
committerByron Jones <bjones@mozilla.com>2013-04-22 10:18:03 +0200
commitbaf36f72baa2095b92b298fd45d9cbb522cdca87 (patch)
treec4f478fb058ea6b92094cd6a6a85bedfe09d7d04 /Bugzilla/Util.pm
parentd6c95940eb4a0e7dc66725d29b099fc75f17fa23 (diff)
downloadbugzilla-baf36f72baa2095b92b298fd45d9cbb522cdca87.tar.gz
bugzilla-baf36f72baa2095b92b298fd45d9cbb522cdca87.tar.xz
Bug 859315: lots of "Lock wait timeout exceeded" errors when updating cf_crash_signature
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm6
1 files changed, 3 insertions, 3 deletions
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