Очистка буффера при новой команде
This commit is contained in:
parent
f2e620615b
commit
de2ba8662f
@ -37,7 +37,10 @@ bool runCommand(char* command) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clean
|
||||||
out_i = 0;
|
out_i = 0;
|
||||||
|
memset(out, 0, sizeof(out));
|
||||||
|
|
||||||
// Read the output a line at a time and store it in the out array
|
// Read the output a line at a time and store it in the out array
|
||||||
while (fgets(path, sizeof(path), fp) != NULL) {
|
while (fgets(path, sizeof(path), fp) != NULL) {
|
||||||
strncpy(out[out_i], path, 100);
|
strncpy(out[out_i], path, 100);
|
||||||
|
Loading…
Reference in New Issue
Block a user