summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tr.c b/src/tr.c
index 61386746f..a31bf10b1 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -899,7 +899,7 @@ find_bracketed_repeat (const struct E_string *es, size_t start_idx,
if (xstrtoul (digit_str, &d_end, base, &tmp_ulong, NULL)
!= LONGINT_OK
|| BEGIN_STATE < tmp_ulong
- || d_end - digit_str != digit_str_len)
+ || digit_str + digit_str_len != d_end)
{
char *tmp = make_printable_str (es->s + start_idx + 2,
i - start_idx - 2);