Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
0.22.3
Browse files Browse the repository at this point in the history
Fixed an option error that allowed two or more -r's to be used and prevented -i from being used before a -r
  • Loading branch information
PQCraft authored Sep 21, 2021
1 parent 55f6cab commit 9df8726
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clibasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

// Base defines

char VER[] = "0.22.2";
char VER[] = "0.22.3";

#if defined(__linux__)
char OSVER[] = "Linux";
Expand Down Expand Up @@ -692,7 +692,7 @@ int main(int argc, char** argv) {
info = true;
if (shortopt) goto chkshortopt;
} else if (!strcmp(argv[i], "--redirection") || (shortopt && argv[i][shortopti] == 'r')) {
if (info) {fputs("Incorrect number of options passed.\n", stderr); exit(1);}
if (redirection) {fputs("Incorrect number of options passed.\n", stderr); exit(1);}
redirection = true;
if (shortopt) goto chkshortopt;
} else if (!strcmp(argv[i], "--command") || !strcmp(argv[i], "-c")) {
Expand Down
3 changes: 3 additions & 0 deletions docs/clibasic.man
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Skips searching for autorun programs.
.TP
\fB\-i\fR, \fB\-\-info\fR
Enables the info text.
.TP
\fB\-r\fR, \fB\-\-redirection\fR
Enables support for redirecting STDIN, STDOUT, and STDERR.
.SH EXAMPLES
.TP
\fBclibasic\fR
Expand Down

0 comments on commit 9df8726

Please sign in to comment.