Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: format strings - replace " with ' to pass proper arguments
  • Loading branch information
perexg committed Feb 19, 2016
1 parent ffa35cd commit eea9c0c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dvr/dvr_rec.c
Expand Up @@ -267,13 +267,20 @@ dvr_clean_directory_separator(char *s, char *tmp, size_t tmplen)
end = tmp + tmplen - 1;
/* replace directory separator */
for (p = tmp; *s && p != end; s++, p++)
*p = *s == '/' ? '-' : *s;
if (*s == '/')
*p = '-';
else if (*s == '"')
*s = '\'';
else
*p = *s;
*p = '\0';
return tmp;
} else {
for (; *s; s++)
if (*s == '/')
*s = '-';
else if (*s == '"')
*s = '\'';
return tmp;
}
}
Expand Down

0 comments on commit eea9c0c

Please sign in to comment.