]> git.sur5r.net Git - openocd/blobdiff - src/helper/interpreter.c
- only some cosmetic changes, convert \r\n to unix
[openocd] / src / helper / interpreter.c
index 17d24b1fe8cd89199f51ad8d77c5b68db65f9216..85cd71586dcd9a820c11b58a1681d97490ededa9 100644 (file)
@@ -126,7 +126,7 @@ int handle_var_command(struct command_context_s *cmd_ctx, char *cmd, char **args
                        last_var_p = &((*last_var_p)->next);
                }
 
-               if ((args[0][0] >= 0) && (args[0][0] <= 9))
+               if ((args[0][0] >= '0') && (args[0][0] <= '9'))
                {
                        command_print(cmd_ctx, "invalid name specified (first character may not be a number)");
                        return ERROR_OK;
@@ -231,7 +231,7 @@ int handle_script_command(struct command_context_s *cmd_ctx, char *cmd, char **a
        echo = cmd_ctx->echo;
        cmd_ctx->echo = 1;
        
-       command_run_file(cmd_ctx, script_file, COMMAND_EXEC);
+       command_run_file(cmd_ctx, script_file, cmd_ctx->mode);
        
        cmd_ctx->echo = echo;