Ignore:
Timestamp:
Jan 13, 2021, 12:40:22 AM (4 months ago)
Author:
alain
Message:

Introduce the socket.c & socket.h files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/stdlib.c

    r650 r684  
    4848        while( str[i] != 0 )
    4949        {
    50             if     ( (str[i] >= '0') && (str[i] <= '9') ) res = (res<<4) + (str[i] - '0');
    51             else if( (str[i] >= 'A') && (str[i] <= 'F') ) res = (res<<4) + (str[i] - 'A');
    52             else if( (str[i] >= 'a') && (str[i] <= 'f') ) res = (res<<4) + (str[i] - 'a');
     50            if     ( (str[i] >= '0') && (str[i] <= '9') ) res = (res<<4) +      (str[i] - '0');
     51            else if( (str[i] >= 'A') && (str[i] <= 'F') ) res = (res<<4) + 10 + (str[i] - 'A');
     52            else if( (str[i] >= 'a') && (str[i] <= 'f') ) res = (res<<4) + 10 + (str[i] - 'a');
    5353            else return 0;
    5454            i++;
Note: See TracChangeset for help on using the changeset viewer.