i've committed this: --- src/global/params.c (revision 2026) +++ src/global/params.c (working copy) @@ -189,7 +189,9 @@ parse_param_lu(const char *eq, long unsi */ if (strncmp(eq, "0x", 2)) { - if (sscanf(eq, "%lu", lu) == 1) + /* Detect non-numeric chars. */ + char c; + if (sscanf(eq, "%lu%c", lu, &c) == 1) return URJ_STATUS_OK; } else @@ -198,7 +200,9 @@ parse_param_lu(const char *eq, long unsi return URJ_STATUS_OK; } - urj_error_set (URJ_ERROR_SYNTAX, "need unsigned int, not '%s'", eq); + urj_error_set (URJ_ERROR_SYNTAX, + "%s: could not parse number (hex values start with 0x)", + eq); return URJ_STATUS_FAIL; } -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ UrJTAG-development mailing list UrJTAG-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/urjtag-development