mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
fix: segv in sample command
This commit is contained in:
parent
7c2e4364e6
commit
6befd57bc1
2
main.c
2
main.c
|
|
@ -699,7 +699,7 @@ VNA_SHELL_FUNCTION(cmd_sample)
|
|||
if (argc!=1) goto usage;
|
||||
// 0 1 2
|
||||
static const char cmd_sample_list[] = "gamma|ampl|ref";
|
||||
switch (getStringIndex(argv[1], cmd_sample_list)){
|
||||
switch (getStringIndex(argv[0], cmd_sample_list)){
|
||||
case 0:sample_func = calculate_gamma; return;
|
||||
case 1:sample_func = fetch_amplitude; return;
|
||||
case 2:sample_func = fetch_amplitude_ref; return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue