summaryrefslogtreecommitdiff
path: root/efm32_debug_mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'efm32_debug_mode.c')
-rw-r--r--efm32_debug_mode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/efm32_debug_mode.c b/efm32_debug_mode.c
index 877cefe..1c503cb 100644
--- a/efm32_debug_mode.c
+++ b/efm32_debug_mode.c
@@ -85,7 +85,9 @@ int main(int argc, char **argv)
use_serial_number = false;
if (argc > 2) {
- if (sscanf(argv[2], "%" PRIu32, &serial_number) != 1) {
+ ret = jaylink_parse_serial_number(argv[2], &serial_number);
+
+ if (ret != JAYLINK_OK) {
printf("Failed to parse serial number: %s.\n",
argv[2]);
return EXIT_FAILURE;