|
|
| version 1.5, 2012/03/16 09:24:07 | version 1.6, 2012/04/19 19:41:29 |
|---|---|
| Line 49 static void _aton(Request& r, MethodPara | Line 49 static void _aton(Request& r, MethodPara |
| bool err=false; | bool err=false; |
| const char* p=ip_cstr; | const char* p=ip_cstr; |
| while(char c=*p++){ | while(char c=*p++){ |
| uint digit=(uint)(c-'0'); // assume ascii | int digit=(int)(c-'0'); // assume ascii |
| if(digit>=0 && digit<=9){ | if(digit>=0 && digit<=9){ |
| byte_start=false; | byte_start=false; |
| if((byte_value=byte_value*10+digit) > 255){ | if((byte_value=byte_value*10+(uint)digit) > 255){ |
| err=true; | err=true; |
| break; | break; |
| } | } |