* decNumber.c (decStrEq): Cast string contents to unsigned char
instead of int before calling tolower.
From-SVN: r108862
+2005-12-20 Roger Sayle <roger@eyesopen.com>
+
+ * decNumber.c (decStrEq): Cast string contents to unsigned char
+ instead of int before calling tolower.
+
2005-12-20 Roger Sayle <roger@eyesopen.com>
* decNumber.c (decStrEq): Cast operands to int before calling
{
for (;; str1++, str2++)
{
- if (*str1 == *str2)
+ unsigned char u1 = (unsigned char) *str1;
+ unsigned char u2 = (unsigned char) *str2;
+ if (u1 == u2)
{
- if (*str1 == '\0')
+ if (u1 == '\0')
break;
}
else
{
- if (tolower ((int) *str1) != tolower ((int) *str2))
+ if (tolower (u1) != tolower (u2))
return 0;
}
} /* stepping */