Changeset 684 for trunk/libs/mini-libc/stdlib.c
- Timestamp:
- Jan 13, 2021, 12:40:22 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/mini-libc/stdlib.c
r650 r684 48 48 while( str[i] != 0 ) 49 49 { 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'); 53 53 else return 0; 54 54 i++;
Note: See TracChangeset
for help on using the changeset viewer.