diff options
author | Moshe Doron <momo@php.net> | 2003-04-01 12:46:01 +0000 |
---|---|---|
committer | Moshe Doron <momo@php.net> | 2003-04-01 12:46:01 +0000 |
commit | 31bd24860c1199aacc3cd5fb54046bd42dd01f48 (patch) | |
tree | 8435754f3f4933e9d2dfd52d1c0b5fb48d442a4b | |
parent | 6eaa47854e9bb6465349247ff3c419c7e0f807ff (diff) | |
download | php-git-31bd24860c1199aacc3cd5fb54046bd42dd01f48.tar.gz |
revert last commit for now
-rw-r--r-- | ext/standard/string.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 132118661d..ceafe56811 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2331,14 +2331,9 @@ PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC) l--; } *s++ = *t++; - } else if (*t == '\\' && l > 0) { - if(t[1] == '0') { - *s++='\0'; - t++; - } else { - *s++=*(++t); - } - t++; + } else if (*t == '\\' && t[1] == '0' && l > 0) { + *s++='\0'; + t+=2; if (len != NULL) { (*len)--; } @@ -2633,10 +2628,6 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f *target++ = '\''; *target++ = '\''; break; - case '\\': - *target++ = '\\'; - *target++ = '\\'; - break; default: *target++ = *source; break; |