- Joined
- Feb 2, 2012
- Messages
- 1,667
- Reaction score
- 104
- Points
- 78
Hi guys,
I think I found a bug in the function GetExhaustSpec(UINT idx, EXHAUSTSPEC* spec) and it seems to me that is present also in the other version of GetExhaustSpec.
Apparently the idx the function is reading is the exhaust counter and not the ID of the exhaust: when I delete an exhaust that is not the last of the list and I use the function with the latest ID orbiter crashes and from the debug it comes out that it crashes because the spec is rubbish.
I made a check printing out all the exhaust ID in the sim and I am calling the right ID, but if I delete an intermediate exhaust the function does not work anymore.
The only way I found to make it work is the following:
I hope I made myself clear enough.
Tested only in Orbiter2016, not in beta.
Fred
I think I found a bug in the function GetExhaustSpec(UINT idx, EXHAUSTSPEC* spec) and it seems to me that is present also in the other version of GetExhaustSpec.
Apparently the idx the function is reading is the exhaust counter and not the ID of the exhaust: when I delete an exhaust that is not the last of the list and I use the function with the latest ID orbiter crashes and from the debug it comes out that it crashes because the spec is rubbish.
I made a check printing out all the exhaust ID in the sim and I am calling the right ID, but if I delete an intermediate exhaust the function does not work anymore.
The only way I found to make it work is the following:
Code:
UINT ID = the ID I want to check
EXHAUSTSPEC es;
for (DWORD i = 0; i < VB1->GetExhaustCount(); i++) {
VB1->GetExhaustSpec(i, &es);
if (es.id == ID) {
break;
}
}
I hope I made myself clear enough.
Tested only in Orbiter2016, not in beta.
Fred