Hi. thanks for the program. Seems to be crashing at init. Diff for fix below.
diff --git a/CInsim.cpp b/CInsim.cpp
index 51f923f..8cd729e 100644
--- a/CInsim.cpp
+++ b/CInsim.cpp
@@ -408,12 +408,11 @@ int CInsim::init()
switch (peek_packet()) // Check if the packet returned was an IS_VER
{
case ISP_VER: // It was, get it!
- IS_VER *packVer;
- memcpy(packVer, (struct IS_VER*)get_packet(), sizeof(struct IS_VER));
- this->hostProduct = packVer->Product;
- this->hostVersion = packVer->Version;
- this->hostInSimVersion = packVer->InSimVer;
- delete packVer;
+ IS_VER packVer;
+ memcpy(&packVer, (IS_VER*)get_packet(), sizeof(IS_VER));
+ this->hostProduct = packVer.Product;
+ this->hostVersion = packVer.Version;
+ this->hostInSimVersion = packVer.InSimVer;
break;
default: // It wasn't, something went wrong. Quit
if (disconnect() < 0) {