mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
input cast to unsigned char for unqualified tolower(); close #342
This commit is contained in:
+3
-2
@@ -802,8 +802,9 @@ readint_float(codegen_scope *s, const char *p, int base)
|
||||
mrb_float f = 0;
|
||||
int n;
|
||||
|
||||
while (p <= e) {
|
||||
char c = tolower(*p);
|
||||
while (p < e) {
|
||||
char c = *p;
|
||||
c = tolower((unsigned char)c);
|
||||
for (n=0; n<base; n++) {
|
||||
if (mrb_digitmap[n] == c) {
|
||||
f *= base;
|
||||
|
||||
Reference in New Issue
Block a user