Created
December 29, 2018 01:20
-
-
Save hughdavenport/5128662f237d8b54d2e2b22dc7d18d5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c | |
index 68922b6966..bc34f19e30 100644 | |
--- a/ext/mbstring/php_mbregex.c | |
+++ b/ext/mbstring/php_mbregex.c | |
@@ -1296,8 +1296,8 @@ PHP_FUNCTION(mb_split) | |
} | |
/* otherwise we just have one last element to add to the array */ | |
- n = ((OnigUChar *)(string + string_len) - chunk_pos); | |
- if (n > 0) { | |
+ if ((OnigUChar *)(string + string_len) > chunk_pos) { | |
+ n = ((OnigUChar *)(string + string_len) - chunk_pos); | |
add_next_index_stringl(return_value, (char *)chunk_pos, n); | |
} else { | |
add_next_index_stringl(return_value, "", 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment