Merge branch 'master' into flagsstrprint

This commit is contained in:
Arsenic Blood 2023-10-04 01:01:40 -04:00 committed by GitHub
commit fb7087143e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -129,5 +129,5 @@ $FG$
* No args are passed in registers.
* RAX holds function return values, of course.
$FG,8$
* "MagicISO" is a trademark owned by MagicISO Corp.

View file

@ -1,5 +1,5 @@
I64 Str2I64(U8 *st, I64 radix=10, U8 **_end_ptr=NULL)
{//String to I64. Similar to strtoul().
{//String to I64. Similar to strtol().
//Allows radix change with "0x20" "0b1010" "0d123" "0o18".
//Be careful of Str2I64("0b101", 16)-->0xB101.
Bool neg = FALSE;
@ -32,6 +32,7 @@ I64 Str2I64(U8 *st, I64 radix=10, U8 **_end_ptr=NULL)
switch (ch)
{
case 'B': radix = 2; st++; break;
case 'O': radix = 8; st++; break;
case 'D': radix = 10; st++; break;
case 'X': radix = 16; st++; break;
}