From a2dbb10eb14801370522ec248e1d819eb38a83a2 Mon Sep 17 00:00:00 2001 From: MySQL Team Date: Fri, 20 Oct 2000 22:26:48 +0000 Subject: Update libmysql to 3.23 version. No major changes visible to the user - mostly bug fixes and other maintenance-oriented changes. --- ext/mysql/libmysql/my_error.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ext/mysql/libmysql/my_error.c') diff --git a/ext/mysql/libmysql/my_error.c b/ext/mysql/libmysql/my_error.c index aeef85dbd4..78c2bb2a74 100644 --- a/ext/mysql/libmysql/my_error.c +++ b/ext/mysql/libmysql/my_error.c @@ -1,5 +1,5 @@ -/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB - This file is public domain and comes with NO WARRANTY of any kind */ +/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB +This file is public domain and comes with NO WARRANTY of any kind */ #include "mysys_priv.h" #include "mysys_err.h" @@ -39,6 +39,7 @@ int my_error(int nr,myf MyFlags, ...) if (tpos[0] != '%') { *endpos++= *tpos++; /* Copy ordinary char */ + olen++; continue; } if (*++tpos == '%') /* test if %% */ @@ -66,8 +67,10 @@ int my_error(int nr,myf MyFlags, ...) { register int iarg; iarg = va_arg(ap, int); - plen= (uint) (int2str((long) iarg,endpos,*tpos == 'd' ? -10 : 10)- - endpos); + if (*tpos == 'd') + plen= (uint) (int2str((long) iarg,endpos, -10) - endpos); + else + plen= (uint) (int2str((long) (uint) iarg,endpos,10)- endpos); if (olen + plen < ERRMSGSIZE+2) /* Replace parameter if possible */ { endpos+=plen; -- cgit v1.2.1