Добавление функции: просто сделай (нету ошибки)

This commit is contained in:
justuser-31 2025-02-15 10:44:47 +03:00
parent af01e28798
commit e9311324f0
2 changed files with 12 additions and 4 deletions

BIN
rtracker

Binary file not shown.

View File

@ -83,11 +83,15 @@ void getOut() {
int main(int argc, char **argv) {
bool isCommand = false; // Flag for detect command section
bool forceOut = false;
bool justTry = false; // No out if error, just try
for(int i = 1; i < argc; i++) {
if (isCommand == false) {
if (strcmp(argv[i], "%o") == 0) {
isCommand = true;
forceOut = true;
} else if (strcmp(argv[i], "%t") == 0) {
isCommand = true;
justTry = true;
} else if (strcmp(argv[i], "%%") == 0) {
isCommand = true;
} else {
@ -110,10 +114,14 @@ int main(int argc, char **argv) {
}
} else {
kill_thread(thread_handle);
printf("\r[%s𐄂%s] %s\n", CL_RED, CL_NORMAL, comment);
// Get out of failed command
getOut();
return 1;
if (justTry) {
printf("\r[%s🗸%s] %s\n", CL_GREEN, CL_NORMAL, comment);
} else {
printf("\r[%s𐄂%s] %s\n", CL_RED, CL_NORMAL, comment);
// Get out of failed command
getOut();
return 1;
}
}
return 0;