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

This commit is contained in:
2025-02-25 11:08:39 +03:00
parent f2e620615b
commit de2ba8662f
2 changed files with 3 additions and 0 deletions
BIN
View File
Binary file not shown.
+3
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);