Merge pull request #75 from Murtaught/master

Replace buggy implementation of function 'remove_all()'.
This commit is contained in:
Luke Smith 2021-05-23 13:03:52 -04:00 committed by GitHub
commit ea5afdccbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,13 +51,13 @@ void remove_all(char *str, char to_remove) {
char *read = str;
char *write = str;
while (*read) {
if (*read == to_remove) {
read++;
if (*read != to_remove) {
*write = *read;
++write;
}
read++;
write++;
++read;
}
*write = '\0';
}
//opens process *cmd and stores output in *output