Git commit f352f4ae9f17c18b5eef3af9ca226964b9c556af by Jaroslaw Staniek. Committed on 03/09/2018 at 14:37. Pushed by staniek into branch '3.1'. Revert "MDB: Finalize removal of num_bytes defines" This reverts commit 82a619c04ad2b15a15fc0b02426c72938edb2ccc. (fix for non C99 compliant compiler - msvs) M +5 -2 src/migration/mdb/3rdparty/mdbtools/libmdb/money.c https://commits.kde.org/kexi/f352f4ae9f17c18b5eef3af9ca226964b9c556af diff --git a/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c b/src/migra= tion/mdb/3rdparty/mdbtools/libmdb/money.c index 599e12664..21bfa4b70 100644 --- a/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c +++ b/src/migration/mdb/3rdparty/mdbtools/libmdb/money.c @@ -48,7 +48,7 @@ char *mdb_money_to_string(MdbHandle *mdb, int start) int neg=3D0; unsigned char multiplier[MAX_NUMERIC_PRECISION], temp[MAX_NUMERIC_P= RECISION]; unsigned char product[MAX_NUMERIC_PRECISION]; - unsigned char bytes[num_bytes]; + unsigned char bytes[8]; = memset(multiplier,0,MAX_NUMERIC_PRECISION); memset(product,0,MAX_NUMERIC_PRECISION); @@ -77,6 +77,8 @@ char *mdb_money_to_string(MdbHandle *mdb, int start) multiply_byte(multiplier, 256, temp); } return array_to_string(product, scale, neg); + +#undef num_bytes } = char *mdb_numeric_to_string(MdbHandle *mdb, int start, int prec, int scale= ) { @@ -85,7 +87,7 @@ char *mdb_numeric_to_string(MdbHandle *mdb, int start, in= t prec, int scale) { int neg=3D0; unsigned char multiplier[MAX_NUMERIC_PRECISION], temp[MAX_NUMERIC_P= RECISION]; unsigned char product[MAX_NUMERIC_PRECISION]; - unsigned char bytes[num_bytes]; + unsigned char bytes[16]; = memset(multiplier,0,MAX_NUMERIC_PRECISION); memset(product,0,MAX_NUMERIC_PRECISION); @@ -104,6 +106,7 @@ char *mdb_numeric_to_string(MdbHandle *mdb, int start, = int prec, int scale) { multiply_byte(multiplier, 256, temp); } return array_to_string(product, scale, neg); +#undef num_bytes } = static int multiply_byte(unsigned char *product, int num, unsigned char *m= ultiplier)