Skip to content
Permalink
Browse files

only increment script line on a valid input, always reset input

  • Loading branch information
samdoshi committed May 2, 2017
1 parent 5477726 commit 4b56809b64483f4be91c0c024b5f99da318d30b8
Showing with 5 additions and 7 deletions.
  1. +5 −7 module/usb_disk_mode.c
@@ -298,11 +298,14 @@ void tele_usb_disk() {
if (status == E_OK) {
ss_overwrite_script_command(
&scene, s, l, &temp);
memset(input, 0, sizeof(input));
l++;
}
else {
print_dbg("\r\nvalidate: ");
print_dbg(tele_error(status));
print_dbg(" >> ");
print_dbg("\r\nINPUT: ");
print_dbg(input);
}
}
else {
@@ -311,14 +314,9 @@ void tele_usb_disk() {
print_dbg(" >> ");
print_dbg("\r\nINPUT: ");
print_dbg(input);
char pcmd[32];
print_command(
ss_get_script_command(&scene, s, l),
pcmd);
print_dbg(pcmd);
}

l++;
memset(input, 0, sizeof(input));
p = 0;
}
}

0 comments on commit 4b56809

Please sign in to comment.