Skip to content

Commit

Permalink
Merge pull request #580 from analogdevicesinc/fix-tools
Browse files Browse the repository at this point in the history
tests/iio_common: Fix HEX value parsing in sanitize_clamp()
  • Loading branch information
dNechita authored Aug 3, 2020
2 parents f0089b5 + f75ced2 commit 692c818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/iio_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ unsigned long int sanitize_clamp(const char *name, const char *argv,
/* sanitized buffer by taking first 20 (or less) char */
iio_snprintf(buf, sizeof(buf), "%s", argv);
errno = 0;
val = strtoul(buf, &end, 10);
val = strtoul(buf, &end, 0);
if (buf == end || errno == ERANGE)
val = 0;
}
Expand Down

0 comments on commit 692c818

Please sign in to comment.