scemino / engge

Open source remake of Thimbleweed Park's engine
https://scemino.github.io/
MIT License
148 stars 15 forks source link

Incorrect value in the "sayLine" variable passed as a parameter in function "ScriptEngine :: call()" #81

Closed Mac1512 closed 4 years ago

Mac1512 commented 4 years ago

In the file _TalkingState.hpp, inside the function:

void loadId (int id)

The value of the "sayLine" parameter, which is passed to the next function is incorrect:

ScriptEngine::call(_pActor, "sayingLine", pAnim, sayLine);

It would contain a rare string, because the following is incorrect:

const char * sayLine = tostring(_sayText).data();

It should be the following:

std::string sayLine = tostring(_sayText).data(); ScriptEngine::call(_pActor, "sayingLine", pAnim, sayLine.c_str());

I have tested this on Windows 10 x64 Bits, compiling the engine for 32 Bits, with VS2029 with the VS2017 tools

regards

Edited:

I have edited the text that had written deletion a part since I have realized that it can only be correct when the actor is willie, and in the absence of more evidence, I will not include this part as a failure.

scemino commented 4 years ago

This has been fixed by this commit de3340367b3a23b0ac77a54bf7a6a2c3a00c9a48 Thank you again @Mac1512