summaryrefslogtreecommitdiffstats
path: root/extensions/spellcheck
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-01 20:16:49 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-11-01 20:16:49 +0100
commite8f913da98fdc9b2c0777dcbebd93bf64feb1dab (patch)
tree412338dd377a9238213672c043bec46f613f1931 /extensions/spellcheck
parente0de8181d9d51cff079f9b54fd6fa276d6aeb094 (diff)
downloadUXP-e8f913da98fdc9b2c0777dcbebd93bf64feb1dab.tar
UXP-e8f913da98fdc9b2c0777dcbebd93bf64feb1dab.tar.gz
UXP-e8f913da98fdc9b2c0777dcbebd93bf64feb1dab.tar.lz
UXP-e8f913da98fdc9b2c0777dcbebd93bf64feb1dab.tar.xz
UXP-e8f913da98fdc9b2c0777dcbebd93bf64feb1dab.zip
Reorder boolean expression to take advantage of short-circuiting.
Diffstat (limited to 'extensions/spellcheck')
-rw-r--r--extensions/spellcheck/src/mozEnglishWordUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/spellcheck/src/mozEnglishWordUtils.cpp b/extensions/spellcheck/src/mozEnglishWordUtils.cpp
index 5033b247b..671b22c16 100644
--- a/extensions/spellcheck/src/mozEnglishWordUtils.cpp
+++ b/extensions/spellcheck/src/mozEnglishWordUtils.cpp
@@ -165,7 +165,7 @@ NS_IMETHODIMP mozEnglishWordUtils::FindNextWord(const char16_t *word, uint32_t l
// before we spend more time looking to see if the word is a url, look for a url identifer
// and make sure that identifer isn't the last character in the word fragment.
- if ( (*p == ':' || *p == '@' || *p == '.') && p < endbuf - 1) {
+ if ( (p < endbuf - 1) && (*p == ':' || *p == '@' || *p == '.') ) {
// ok, we have a possible url...do more research to find out if we really have one
// and determine the length of the url so we can skip over it.