Очистка буффера при новой команде

This commit is contained in:
justuser-31 2025-02-25 11:08:39 +03:00
parent f2e620615b
commit de2ba8662f
2 changed files with 3 additions and 0 deletions

BIN
rtracker

Binary file not shown.

View File

@ -37,7 +37,10 @@ bool runCommand(char* command) {
return false;
}
// Clean
out_i = 0;
memset(out, 0, sizeof(out));
// Read the output a line at a time and store it in the out array
while (fgets(path, sizeof(path), fp) != NULL) {
strncpy(out[out_i], path, 100);