small fix

This commit is contained in:
merlokk 2017-10-18 15:40:43 +03:00
commit 715fdbffcd

View file

@ -127,6 +127,7 @@ void main_loop(char *script_cmds_file, char *script_cmd, bool usb_present) {
// If there is a script file // If there is a script file
if (script_file) if (script_file)
{ {
memset(script_cmd_buf, 0, sizeof(script_cmd_buf));
if (!fgets(script_cmd_buf, sizeof(script_cmd_buf), script_file)) { if (!fgets(script_cmd_buf, sizeof(script_cmd_buf), script_file)) {
fclose(script_file); fclose(script_file);
script_file = NULL; script_file = NULL;