aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/i2ctools.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/i2ctools.c b/toys/other/i2ctools.c
index c9a11466..cd1b892c 100644
--- a/toys/other/i2ctools.c
+++ b/toys/other/i2ctools.c
@@ -196,7 +196,7 @@ void i2cdetect_main(void)
bus = atolx_range(*toys.optargs, 0, INT_MAX);
if (toys.optc == 3) {
first = atolx_range(toys.optargs[1], 0, 0x7f);
- last = atolx_range(toys.optargs[1], 0, 0x7f);
+ last = atolx_range(toys.optargs[2], 0, 0x7f);
if (first > last) error_exit("first > last");
}