mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 20:31:00 +08:00
Avoid dynamic array allocation on stack.
This might help some non C99 compliant compilers, while being a trivial change.
This commit is contained in:
parent
072f7c6518
commit
9b4d5e624b
@ -42,7 +42,7 @@ static char *array_to_string(unsigned char *array, int unsigned scale, int neg);
|
||||
*/
|
||||
char *mdb_money_to_string(MdbHandle *mdb, int start)
|
||||
{
|
||||
int num_bytes=8, scale=4;
|
||||
const int num_bytes=8, scale=4;
|
||||
int i;
|
||||
int neg=0;
|
||||
unsigned char multiplier[MAX_NUMERIC_PRECISION], temp[MAX_NUMERIC_PRECISION];
|
||||
@ -80,7 +80,7 @@ char *mdb_money_to_string(MdbHandle *mdb, int start)
|
||||
}
|
||||
|
||||
char *mdb_numeric_to_string(MdbHandle *mdb, int start, int prec, int scale) {
|
||||
int num_bytes = 16;
|
||||
const int num_bytes = 16;
|
||||
int i;
|
||||
int neg=0;
|
||||
unsigned char multiplier[MAX_NUMERIC_PRECISION], temp[MAX_NUMERIC_PRECISION];
|
||||
|
Loading…
Reference in New Issue
Block a user