Skip to content

Commit 0885e4b

Browse files
committed
simplify the condition
1 parent 7d4c81d commit 0885e4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/browscap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ static int browser_reg_compare(zval *browser TSRMLS_DC, int num_args, va_list ar
414414

415415
/* Pick which browser pattern replaces the least amount of
416416
characters when compared to the original user agent string... */
417-
if (ua_len - prev_len > ua_len - curr_len) {
417+
if (prev_len < curr_len) {
418418
ZVAL_COPY_VALUE(found_browser_entry, browser);
419419
}
420420
}

0 commit comments

Comments
 (0)