File tree 2 files changed +12
-1
lines changed 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,6 @@ UBreakIterator*
54
54
grapheme_get_break_iterator (void * stack_buffer , UErrorCode * status TSRMLS_DC );
55
55
56
56
/* OUTSIDE_STRING: check if (possibly negative) long offset is outside the string with int32_t length */
57
- #define OUTSIDE_STRING (offset , max_len ) ( offset < INT32_MIN || offset > INT32_MAX || (offset < 0 ? -offset > (long) max_len : offset >= (long) max_len) )
57
+ #define OUTSIDE_STRING (offset , max_len ) ( offset <= INT32_MIN || offset > INT32_MAX || (offset < 0 ? -offset > (long) max_len : offset >= (long) max_len) )
58
58
59
59
#endif // GRAPHEME_GRAPHEME_UTIL_H
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ grapheme() str[i]pos limits
3
+ --SKIPIF--
4
+ <?php if ( !extension_loaded ( 'intl ' ) ) print 'skip ' ; ?>
5
+ --FILE--
6
+ <?php
7
+ var_dump (grapheme_stripos (1 ,1 ,2147483648 ));
8
+ var_dump (grapheme_strpos (1 ,1 ,2147483648 ));
9
+ --EXPECT --
10
+ bool (false )
11
+ bool (false )
You can’t perform that action at this time.
0 commit comments