Author: infinoid
Date: Sat Dec 20 19:12:19 2008
New Revision: 34171
Modified:
trunk/languages/perl6/src/pmc/perl6str.pmc
Log:
[cage] Fix up some t/codingstd/check_toxxx() failures.
Modified: trunk/languages/perl6/src/pmc/perl6str.pmc
==============================================================================
--- trunk/languages/perl6/src/pmc/perl6str.pmc (original)
+++ trunk/languages/perl6/src/pmc/perl6str.pmc Sat Dec 20 19:12:19 2008
@@ -34,7 +34,7 @@
while (pos + underscore_skip < stop) {
unsigned int current = *(pos + underscore_skip);
if (isdigit(current)) current -= '0';
- else if (isalpha(current)) current = tolower(current) - 'a' + 10;
+ else if (isalpha(current)) current = tolower((unsigned char)current) - 'a' + 10;
else break;
if (current >= radix) break;
@@ -56,9 +56,9 @@
while (pos + underscore_skip < stop) {
unsigned int current = *(pos + underscore_skip);
/* if we find an 'e' in radix 10, we're done */
- if (radix == 10 && tolower(current) == 'e') break;
+ if (radix == 10 && tolower((unsigned char)current) == 'e') break;
if (isdigit(current)) current -= '0';
- else if (isalpha(current)) current = tolower(current) - 'a' + 10;
+ else if (isalpha(current)) current = tolower((unsigned char)current) - 'a' + 10;
else break;
if (current >= radix) break;