com php-src: partial fix to hebrev: ext/standard/string.c

From: Date: Wed, 16 Oct 2013 10:09:44 +0000
Subject: com php-src: partial fix to hebrev: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73482@lists.php.net to get a copy of this message
Commit: 734f9e58f912233fd0bdb007033b90d8286a7eed Author: Anatol Belski <ab@php.net> Wed, 21 Aug 2013 04:30:54 -0700 Parents: 5b6f0092f4d0b33dd80cdd093585df9829736786 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=734f9e58f912233fd0bdb007033b90d8286a7eed Log: partial fix to hebrev Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index 4930818..fb139c9 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4064,8 +4064,8 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines) block_end++; block_length++; } - for (i = block_start; i<= block_end; i++) { - *target = str[i]; + for (i = block_start+1; i<= block_end+1; i++) { + *target = str[i-1]; switch (*target) { case '(': *target = ')'; @@ -4113,8 +4113,8 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines) tmp--; block_end--; } - for (i = block_end; i >= block_start; i--) { - *target = str[i]; + for (i = block_end+1; i >= block_start+1; i--) { + *target = str[i-1]; target--; } block_type = _HEB_BLOCK_TYPE_HEB;

« previous php.cvs (#73482) next »