Skip to content

Commit

Permalink
Release v3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Köhler committed May 21, 2024
1 parent 2a5cb0b commit a131701
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libcscutils/src/common/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@
void csc_strremovedup(char * str, char dup)
{
size_t len = strlen(str);
size_t k, l;
for ( k = 0; k < len -1; k++) {
size_t k = 0, l;
while ( k < len -1 ) {
if ( str[k] == str[k+1] && str[k] == dup) {
for (l = k; l < len-1; l++) {
str[k] = str[k+1];
str[l] = str[l+1];
}
str[len-1] = 0;
len--;
}
k++;
}
return;
}
Expand Down

0 comments on commit a131701

Please sign in to comment.