Article # 579, added by Geoworks, historical record
| first | previous | index | next | last |

Proper buffer size for FloatFloatToAscii_StdFormat()



When using FloatFloatToAscii_StdFormat() make sure that the buffer
you pass to it is FLOAT_TO_ASCII_NORMAL_BUF_LEN in size 
(FLOAT_TO_ASCII_HUGE_BUF_LEN if using FFAF_DONT_USE_SCIENTIFIC)

For example:

    char resultBuf[FLOAT_TO_ASCII_NORMAL_BUF_LEN];
    FloatFloatToAsciiFormatFlags format = FFAF_FROM_ADDR;
    FloatFloatToAscii_StdFormat( resultBuf, &floatNum, format, 6, 3 );

If the buffer is smaller, the system will overwrite the buffer, 
causing memory trashing bugs to occur.