From f3a6b15deccbcdd7de68a13adbea06018c1ac602 Mon Sep 17 00:00:00 2001 From: insofaras Date: Thu, 1 Sep 2016 20:33:42 +0100 Subject: [PATCH] i messed up tabs/spaces again fml --- linux_4ed.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/linux_4ed.cpp b/linux_4ed.cpp index 89a3c594..4ca984cb 100644 --- a/linux_4ed.cpp +++ b/linux_4ed.cpp @@ -505,25 +505,25 @@ Sys_Get_Canonical_Sig(system_get_canonical){ while(read_p < filename + len){ if(read_p == filename || read_p[0] == '/'){ - if(read_p[1] == '/'){ - ++read_p; - } else if(read_p[1] == '.'){ - if(read_p[2] == '/' || !read_p[2]){ - read_p += 2; - } else if(read_p[2] == '.' && (read_p[3] == '/' || !read_p[3])){ - while(write_p > path && *--write_p != '/'); - read_p += 3; - } else { - *write_p++ = *read_p++; - } - } else { - *write_p++ = *read_p++; - } + if(read_p[1] == '/'){ + ++read_p; + } else if(read_p[1] == '.'){ + if(read_p[2] == '/' || !read_p[2]){ + read_p += 2; + } else if(read_p[2] == '.' && (read_p[3] == '/' || !read_p[3])){ + while(write_p > path && *--write_p != '/'); + read_p += 3; + } else { + *write_p++ = *read_p++; + } + } else { + *write_p++ = *read_p++; + } } else { *write_p++ = *read_p++; } } - if(write_p == path) *write_p++ = '/'; + if(write_p == path) *write_p++ = '/'; if(max >= (write_p - path)){ memcpy(buffer, path, write_p - path);