summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index b3860ade5d..bf2df9a612 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1433,7 +1433,7 @@ PHPAPI void php_basename(const char *s, size_t len, char *suffix, size_t sufflen
goto quit_loop;
case 1:
#if defined(PHP_WIN32) || defined(NETWARE)
- if (*c == '/' || *c == '\\') {
+ if (*c == '/' || *c == '\\' || (*c == ':' && (c - s == 1))) {
#else
if (*c == '/') {
#endif