Skip to content

Commit

Permalink
Fixes #78
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockoS committed Oct 10, 2023
1 parent 26e6c4c commit 17aa773
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cli/etripator.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,30 @@ int main(int argc, const char **argv) {
return EXIT_FAILURE;
}

/* Log CLI */
{
size_t len = 0;
char *buffer;
for(i=0; i<argc; i++) {
len += strlen(argv[i]) + 1;
}
buffer = (char*)malloc(len);
if(buffer == NULL) {
/* too bad... */
} else {
char *ptr = buffer;
for(int i=0; i<argc; i++) {
size_t n = strlen(argv[i]);
strcpy(ptr, argv[i]);
ptr += n;
*ptr++ = ' ';
}
buffer[len-1] = '\0';
INFO_MSG("Command line: %s", buffer);
free(buffer);
}
}

failure = 1;
section_count = 0;
section = NULL;
Expand Down

0 comments on commit 17aa773

Please sign in to comment.