summaryrefslogtreecommitdiff
path: root/src/htscore.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-08-17 07:57:44 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-08-17 07:57:44 +0000
commit5ab61bd6e3c21d35ed418613676f3be86fd78869 (patch)
treeddfa6a5c4ba49eb33655a610d7d2de684cb0d7de /src/htscore.c
parent1e12f60120e2390ba93c83d906839fdcb38107f0 (diff)
Some cleanup in obviously wrong 15-year-old code.
Diffstat (limited to 'src/htscore.c')
-rw-r--r--src/htscore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/htscore.c b/src/htscore.c
index 3315409..578df60 100644
--- a/src/htscore.c
+++ b/src/htscore.c
@@ -2904,16 +2904,16 @@ void usercommand(httrackp * opt, int _exe, const char *_cmd, const char *file,
}
void usercommand_exe(const char *cmd, const char *file) {
char BIGSTK temp[8192];
- char c[2] = "";
- int i;
+ size_t i;
temp[0] = '\0';
//
- for(i = 0; i < (int) strlen(cmd); i++) {
+ for(i = 0; cmd[i] != '\0'; i++) {
if ((cmd[i] == '$') && (cmd[i + 1] == '0')) {
strcatbuff(temp, file);
i++;
} else {
+ char c[2];
c[0] = cmd[i];
c[1] = '\0';
strcatbuff(temp, c);