From: Kevin M. Rosenberg Date: Wed, 27 Mar 2002 05:48:22 +0000 (+0000) Subject: r1671: *** empty log message *** X-Git-Tag: v3.8.6~1205 X-Git-Url: http://git.kpe.io/?a=commitdiff_plain;ds=sidebyside;h=c60de8741d11ae54f2bfcadf87c8703ad7da0970;p=clsql.git r1671: *** empty log message *** --- diff --git a/interfaces/mysql/clsql-mysql.c b/interfaces/mysql/clsql-mysql.c index 4fd36db..ac83039 100644 --- a/interfaces/mysql/clsql-mysql.c +++ b/interfaces/mysql/clsql-mysql.c @@ -6,7 +6,7 @@ * Programmer: Kevin M. Rosenberg * Date Started: Mar 2002 * - * $Id: clsql-mysql.c,v 1.2 2002/03/27 05:37:35 kevin Exp $ + * $Id: clsql-mysql.c,v 1.3 2002/03/27 05:48:22 kevin Exp $ * * This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg * @@ -84,6 +84,13 @@ atol64 (const unsigned char* str, int* pHigh32) { long long result = 0; int minus = 0; + int first_char = *str; + if (first_char == '+') + ++str; + else if (first_char == '-') { + minus = 1; + ++str; + } while (*str) { int i = *str - '0'; @@ -92,6 +99,8 @@ atol64 (const unsigned char* str, int* pHigh32) result = i + (10 * result); str++; } + if (minus) + result = -result; *pHigh32 = upper_32bits(result); return lower_32bits(result);