mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-05-07 07:37:50 +08:00
Fixed a bug that would remove the first two digits after the decimal mark in NUMERIC (decimal) fields
This commit is contained in:
parent
037b9bc8fc
commit
82b28d6845
@ -715,7 +715,7 @@ mdb_num_to_string(MdbHandle *mdb, int start, int datatype, int prec, int scale)
|
|||||||
text = (char *) g_malloc(prec+2);
|
text = (char *) g_malloc(prec+2);
|
||||||
sprintf(text, "%0*" G_GINT32_FORMAT, prec, GINT32_FROM_LE(l));
|
sprintf(text, "%0*" G_GINT32_FORMAT, prec, GINT32_FROM_LE(l));
|
||||||
if (scale) {
|
if (scale) {
|
||||||
memmove(text+prec-scale, text+prec-scale+1, scale+1);
|
memmove(text+prec-scale+1, text+prec-scale, scale+1);
|
||||||
text[prec-scale] = '.';
|
text[prec-scale] = '.';
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
Loading…
Reference in New Issue
Block a user