i messed up tabs/spaces again fml

master
insofaras 2016-09-01 20:33:42 +01:00
parent 0ad5165cf2
commit f3a6b15dec
1 changed files with 15 additions and 15 deletions

View File

@ -505,25 +505,25 @@ Sys_Get_Canonical_Sig(system_get_canonical){
while(read_p < filename + len){ while(read_p < filename + len){
if(read_p == filename || read_p[0] == '/'){ if(read_p == filename || read_p[0] == '/'){
if(read_p[1] == '/'){ if(read_p[1] == '/'){
++read_p; ++read_p;
} else if(read_p[1] == '.'){ } else if(read_p[1] == '.'){
if(read_p[2] == '/' || !read_p[2]){ if(read_p[2] == '/' || !read_p[2]){
read_p += 2; read_p += 2;
} else if(read_p[2] == '.' && (read_p[3] == '/' || !read_p[3])){ } else if(read_p[2] == '.' && (read_p[3] == '/' || !read_p[3])){
while(write_p > path && *--write_p != '/'); while(write_p > path && *--write_p != '/');
read_p += 3; read_p += 3;
} else { } else {
*write_p++ = *read_p++; *write_p++ = *read_p++;
} }
} else { } else {
*write_p++ = *read_p++; *write_p++ = *read_p++;
} }
} else { } else {
*write_p++ = *read_p++; *write_p++ = *read_p++;
} }
} }
if(write_p == path) *write_p++ = '/'; if(write_p == path) *write_p++ = '/';
if(max >= (write_p - path)){ if(max >= (write_p - path)){
memcpy(buffer, path, write_p - path); memcpy(buffer, path, write_p - path);