summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index 10209d7..75f130c 100644
--- a/main.c
+++ b/main.c
@@ -308,6 +308,7 @@ int main(int argc, char *argv[])
break;
}
curPos += count;
+ buf[curPos] = '\0';
}
*newlinePos = '\0';
@@ -452,9 +453,10 @@ int main(int argc, char *argv[])
fputs("KILLED\n", ctrloutFile);
}
}
+
if(newlinePos != 0)
{
- memmove(buf, newlinePos + 1, strlen(newlinePos + 1));
+ memmove(buf, newlinePos + 1, strlen(newlinePos + 1) + 1);
}
else
{