diff options
author | MySQL Team <mysql@php.net> | 2000-10-20 22:26:48 +0000 |
---|---|---|
committer | MySQL Team <mysql@php.net> | 2000-10-20 22:26:48 +0000 |
commit | a2dbb10eb14801370522ec248e1d819eb38a83a2 (patch) | |
tree | c3888dc986fa7baa6937b38d485af20d8ee81d9d /ext/mysql/libmysql/my_error.c | |
parent | ebaf484830ab5c7a0e14a9b43a174916330cd031 (diff) | |
download | php-git-a2dbb10eb14801370522ec248e1d819eb38a83a2.tar.gz |
Update libmysql to 3.23 version. No major changes visible to the user - mostly
bug fixes and other maintenance-oriented changes.
Diffstat (limited to 'ext/mysql/libmysql/my_error.c')
-rw-r--r-- | ext/mysql/libmysql/my_error.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; |