|
|
| version 1.57, 2010/10/13 11:30:08 | version 1.58, 2010/10/13 12:28:45 |
|---|---|
| Line 360 static void _crc32(Request& r, MethodPar | Line 360 static void _crc32(Request& r, MethodPar |
| static void toBase(long value, int base, char*& ptr){ | static void toBase(long value, int base, char*& ptr){ |
| static const char* hex="0123456789ABCDEF"; | static const char* hex="0123456789ABCDEF"; |
| int rest = value % base; | int rest = value % base; |
| if(value > base) | if(value >= base) |
| toBase( (value-rest)/base, base, ptr); | toBase( (value-rest)/base, base, ptr); |
| *ptr++=(char)hex[rest]; | *ptr++=(char)hex[rest]; |
| } | } |