Skip to content
Snippets Groups Projects
Commit 913b26b3 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

A few bugfixes.

Rev: src/combine_path.h:1.2
parent a2492d5a
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ static void APPEND_PATH(struct string_builder *s, ...@@ -85,7 +85,7 @@ static void APPEND_PATH(struct string_builder *s,
if(s->s->len && !IS_SEP(LAST_PUSHED())) if(s->s->len && !IS_SEP(LAST_PUSHED()))
PUSH('/'); PUSH('/');
while(s->s->len==2) if(s->s->len==2)
{ {
PCHARP to=MKPCHARP_STR(s->s); PCHARP to=MKPCHARP_STR(s->s);
if(INDEX_PCHARP(to, 0) == '.') if(INDEX_PCHARP(to, 0) == '.')
...@@ -163,7 +163,7 @@ static void APPEND_PATH(struct string_builder *s, ...@@ -163,7 +163,7 @@ static void APPEND_PATH(struct string_builder *s,
if(from>=len) break; if(from>=len) break;
PUSH(INDEX_PCHARP(path, from++)); PUSH(INDEX_PCHARP(path, from++));
} }
if(s->s->len && if((s->s->len > 1) &&
!IS_SEP(INDEX_PCHARP(path, from-1)) && !IS_SEP(INDEX_PCHARP(path, from-1)) &&
IS_SEP(LAST_PUSHED())) IS_SEP(LAST_PUSHED()))
s->s->len--; s->s->len--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment