Skip to content

Commit 0354ec7

Browse files
authored
Merge pull request #244 from EricccTaiwan/fix-reps-check
Ensure repetitions input is at least 1
2 parents 3c7c7b3 + 7f718cf commit 0354ec7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qtest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static bool queue_insert(position_t pos, int argc, char *argv[])
210210

211211
char *inserts = argv[1];
212212
if (argc == 3) {
213-
if (!get_int(argv[2], &reps)) {
213+
if (!get_int(argv[2], &reps) || reps < 1) {
214214
report(1, "Invalid number of insertions '%s'", argv[2]);
215215
return false;
216216
}

0 commit comments

Comments
 (0)