Skip to content

Commit bda11c6

Browse files
committed
partial fix to hebrev
1 parent c8fbe07 commit bda11c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/standard/string.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4064,8 +4064,8 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines)
40644064
block_end++;
40654065
block_length++;
40664066
}
4067-
for (i = block_start; i<= block_end; i++) {
4068-
*target = str[i];
4067+
for (i = block_start+1; i<= block_end+1; i++) {
4068+
*target = str[i-1];
40694069
switch (*target) {
40704070
case '(':
40714071
*target = ')';
@@ -4113,8 +4113,8 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines)
41134113
tmp--;
41144114
block_end--;
41154115
}
4116-
for (i = block_end; i >= block_start; i--) {
4117-
*target = str[i];
4116+
for (i = block_end+1; i >= block_start+1; i--) {
4117+
*target = str[i-1];
41184118
target--;
41194119
}
41204120
block_type = _HEB_BLOCK_TYPE_HEB;

0 commit comments

Comments
 (0)