SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By alarsen
#19076
Hi,
I just looked into a compiler warning;
it seems the test for leading digit in handle_var_command() is incorrect.
Possible fix below.
Cheers
Anders
Code: Select all
--- src/helper/interpreter.c    (revision 98)
+++ src/helper/interpreter.c    (working copy)
@@ -126,7 +126,7 @@
                        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;
By Dominic
#19094
Hello Anders,

of course you're right. Thanks for the fix, I'll upload it with the next set of changes.

Regards,

Dominic