summaryrefslogtreecommitdiffstats
path: root/newlib/libc/string/str-two-way.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/string/str-two-way.h')
-rw-r--r--newlib/libc/string/str-two-way.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/string/str-two-way.h b/newlib/libc/string/str-two-way.h
index ad71a2595..72b60c39c 100644
--- a/newlib/libc/string/str-two-way.h
+++ b/newlib/libc/string/str-two-way.h
@@ -114,7 +114,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len,
while (j + k < needle_len)
{
a = CANON_ELEMENT (needle[j + k]);
- b = CANON_ELEMENT (needle[max_suffix + k]);
+ b = CANON_ELEMENT (needle[(size_t)(max_suffix + k)]);
if (a < b)
{
/* Suffix is smaller, period is entire prefix so far. */