Ignore:
Timestamp:
Apr 29, 2008, 5:23:33 PM (14 years ago)
Author:
charles
Message:

tweak the last commit: when parsing peer-ids we don't want locales to postentially change the behavior of isalpha/isdigit/etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/clients.c

    r5723 r5724  
    3737charint( char ch )
    3838{
    39     if( isdigit( ch ) ) return ch - '0';
    40     if( isupper( ch ) ) return 10 + ch - 'A';
    41     if( islower( ch ) ) return 36 + ch - 'a';
     39    if( '0' <= ch && ch <= '9' ) return      ch - '0';
     40    if( 'A' <= ch && ch <= 'Z' ) return 10 + ch - 'A';
     41    if( 'a' <= ch && ch <= 'z' ) return 36 + ch - 'a';
    4242    return 0;
    4343}
Note: See TracChangeset for help on using the changeset viewer.