Tweaks to fix setCONNTest on Windows 8
- Temporarily disabled the sending of a CONF message from the plugin in response to setCONN. The CONF message causes crashes on Windows 8 when setCONN is called multiple times. - Removed code that attempted to free result slots in parseRequest before overwritting them with new allocations. The CTests suite currently calls parseRequest with a multidimensional array allocated on the stack, resulting in an attempt to free stack memory. A better solution may be to simply check whether the existing result slots are long enough. - As of this commit, all tests in the CTests suite are passing on Windows 8 for X-Plane 9, X-Plane 10 23bit and X-Plane 10 64bit.
This commit is contained in:
@@ -571,10 +571,10 @@ short parseRequest(const char my_message[], float *resultArray[], short arraySiz
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
arraySizes[i] = my_message[place];
|
||||
if (resultArray[i] != NULL)
|
||||
{
|
||||
free(resultArray[i]);
|
||||
}
|
||||
//if (resultArray[i] != NULL)
|
||||
//{
|
||||
// free(resultArray[i]);
|
||||
//}
|
||||
resultArray[i] = malloc(arraySizes[i]*sizeof(float));
|
||||
|
||||
memcpy(resultArray[i],&my_message[place + 1],arraySizes[i]*sizeof(float));
|
||||
|
||||
Reference in New Issue
Block a user