The online racing simulator
Searching in All forums
(2 results)
krolcyganow
S3 licensed
if anybody wants to get involved but thinks he lacks knowledge here's a FREE course that covers many mathematical topics. https://www.edx.org/course/model-based-automotive-systems-engineering
krolcyganow
S3 licensed
Quote from denis-takumi :Hello programmers! I added a new OutSimPack.h to library
https://github.com/turbosnail/cinsim/blob/master/OutSimPack.h

Post from Scawen https://www.lfs.net/forum/post/1951461

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) {

FGED GREDG RDFGDR GSFDG