소스 검색

Remove repeating backslashes only on Windows

Sergey Lyubka 13 년 전
부모
커밋
84a76fba69
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      mongoose.c

+ 2 - 2
mongoose.c

@@ -1696,9 +1696,9 @@ static void remove_double_dots_and_double_slashes(char *s) {
 
   while (*s != '\0') {
     *p++ = *s++;
-    if (s[-1] == '/' || s[-1] == '\\') {
+    if (s[-1] == '/' || s[-1] == DIRSEP) {
       // Skip all following slashes and backslashes
-      while (*s == '/' || *s == '\\') {
+      while (*s == '/' || *s == DIRSEP) {
         s++;
       }