com php-src: disregard leading slash: phpdbg_utils.c
| From: | Bob Weinand | Date: | Wed, 18 Dec 2013 17:00:26 +0000 |
| Subject: | com php-src: disregard leading slash: phpdbg_utils.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74540@lists.php.net to get a copy of this message | ||
Commit: 08393ad2aca8b4f22b1d206ef8e771fa07fe0385
Author: krakjoe <joe.watkins@live.co.uk> Wed, 18 Dec 2013 17:00:26 +0000
Parents: 944ebb36c8e92f96a0bc5613e0eee8a37960d328
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=08393ad2aca8b4f22b1d206ef8e771fa07fe0385
Log:
disregard leading slash
Changed paths:
M phpdbg_utils.c
Diff:
diff --git a/phpdbg_utils.c b/phpdbg_utils.c
index 8584d20..86c17a7 100644
--- a/phpdbg_utils.c
+++ b/phpdbg_utils.c
@@ -115,6 +115,12 @@ PHPDBG_API int phpdbg_is_class_method(const char *str, size_t len, char
**class,
}
if (class != NULL) {
+
+ if (str[0] == '\\') {
+ str++;
+ len--;
+ }
+
*class = estrndup(str, sep - str);
(*class)[sep - str] = 0;
}