--- parser3/src/classes/math.C 2010/10/13 11:30:08 1.57 +++ parser3/src/classes/math.C 2012/03/16 09:24:07 1.59 @@ -1,15 +1,13 @@ /** @file Parser: @b math parser class. - Copyright(c) 2001-2005 ArtLebedev Group(http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) portions from gen_uuid.c, Copyright (C) 1996, 1997, 1998, 1999 Theodore Ts'o. */ -static const char * const IDENT_MATH_C="$Date: 2010/10/13 11:30:08 $"; - #include "pa_vmethod_frame.h" #include "pa_common.h" #include "pa_vint.h" @@ -32,6 +30,8 @@ static const char * const IDENT_MATH_C=" extern char *crypt(const char* , const char* ); #endif +volatile const char * IDENT_MATH_C="$Id: math.C,v 1.59 2012/03/16 09:24:07 moko Exp $"; + // defines #define MAX_SALT 8 @@ -360,7 +360,7 @@ static void _crc32(Request& r, MethodPar static void toBase(long value, int base, char*& ptr){ static const char* hex="0123456789ABCDEF"; int rest = value % base; - if(value > base) + if(value >= base) toBase( (value-rest)/base, base, ptr); *ptr++=(char)hex[rest]; }