1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Reorder boolean expression to take advantage of short-circuiting.

This commit is contained in:
wolfbeast
2018-11-01 20:16:49 +01:00
committed by Roy Tam
parent 416ce4eb69
commit df1cfaae17
@@ -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.