diff options
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_error.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysys/my_error.c b/mysys/my_error.c index 8a377f63c7e..0f8ffb7c05f 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -82,6 +82,11 @@ int my_error(int nr,myf MyFlags, ...) If "%.*u" or "%.*d" are encountered, the precision number is read from the variable argument list but its value is ignored. */ + if (*tpos == '-') + { + tpos++; + olen--; + } prec_supplied= 0; if (*tpos== '.') { @@ -94,6 +99,14 @@ int my_error(int nr,myf MyFlags, ...) prec_chars= va_arg(ap, int); /* get length parameter */ prec_supplied= 1; } + else + { + for (prec_chars= 0; my_isdigit(&my_charset_latin1, *tpos); tpos++, olen--) + { + prec_supplied= 1; + prec_chars= prec_chars * 10 + *tpos - '0'; + } + } } if (!prec_supplied) |