Skip to content

Commit 118683d

Browse files
authored
fix: correct preview method selection (#1038)
1 parent bcc9c0d commit 118683d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/cli/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,18 +409,18 @@ struct SDCliParams {
409409
return -1;
410410
}
411411
const char* preview = argv[index];
412-
int preview_method = -1;
412+
int preview_found = -1;
413413
for (int m = 0; m < PREVIEW_COUNT; m++) {
414414
if (!strcmp(preview, previews_str[m])) {
415-
preview_method = m;
415+
preview_found = m;
416416
}
417417
}
418-
if (preview_method == -1) {
418+
if (preview_found == -1) {
419419
fprintf(stderr, "error: preview method %s\n",
420420
preview);
421421
return -1;
422422
}
423-
preview_method = (preview_t)preview_method;
423+
preview_method = (preview_t)preview_found;
424424
return 1;
425425
};
426426

0 commit comments

Comments
 (0)