diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-20 16:28:02 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-20 16:28:02 +0100 |
| commit | 34524a3c5da2a8f6e9e13e112b6c55cc71e757ea (patch) | |
| tree | 28e5d053c1c1aeed7ceb950a87471d2e64d8fcd4 /src/commands.c | |
| parent | e04bd49636ef3490a8f4845189e4c9c9cfa1b059 (diff) | |
| download | nissy-34524a3c5da2a8f6e9e13e112b6c55cc71e757ea.tar.gz nissy-34524a3c5da2a8f6e9e13e112b6c55cc71e757ea.zip | |
Bugfix in reading scramble
Diffstat (limited to '')
| -rw-r--r-- | src/commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands.c b/src/commands.c index b089a1c..48f5eba 100644 --- a/src/commands.c +++ b/src/commands.c | |||
| @@ -322,8 +322,8 @@ read_scramble(int c, char **v, CommandArgs *args) | |||
| 322 | unsigned int j; | 322 | unsigned int j; |
| 323 | char *algstr; | 323 | char *algstr; |
| 324 | 324 | ||
| 325 | if (new_alg(v[0])->len == 0) { | 325 | if (c < 1 || new_alg(v[0])->len == 0) { |
| 326 | fprintf(stderr, "%s: moves or option unrecognized\n", v[0]); | 326 | fprintf(stderr, "Error reading scramble\n"); |
| 327 | return false; | 327 | return false; |
| 328 | } | 328 | } |
| 329 | 329 | ||
