Browse Source

Added support for binary string interpretation in strtoi variants when using the 0b prefix.

release/0.19
JustinAJ 10 years ago
parent
commit
ac89e44111
  1. 11
      Jupiter/Functions.c

11
Jupiter/Functions.c

@ -634,6 +634,11 @@ unsigned int strtoui_nospace(const char *str, int base)
str++;
base = 16;
}
else if (*str == 'b' || *str == 'B')
{
str++;
base = 2;
}
else base = 8;
}
else base = 10;
@ -753,6 +758,12 @@ unsigned int strtoui_nospace_s(const char *str, size_t length, int base)
str++;
base = 16;
}
else if (*str == 'b' || *str == 'B')
{
if (--length == 0) return total;
str++;
base = 2;
}
else base = 8;
}
else base = 10;

Loading…
Cancel
Save