i messed up tabs/spaces again fml
parent
0ad5165cf2
commit
f3a6b15dec
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue