[Coin-lpsolver] Is this bug fixed?
Yiming Yao
yao3 at llnl.gov
Wed Aug 6 22:04:47 EDT 2003
I've found this bug in a June build, wondering if it's fixed.
File: CoinMpsIO.cpp
static void
convertDouble(int formatType, double value, char outputValue[20],
const char * name, char outputRow[100])
{
....
char format[7];
sprintf(format,"%%12.%df",decimal);
.....
}
PROBLEM:
If decimal = 10, format would be "12.10df" -- requiring 8 bytes to include
'\0' at the end.
SOLUTION:
Let format be 8 byte long:
char format[8];
sprintf(format,"%%12.%df",decimal);
More information about the Clp
mailing list