From 9a1b37e7f6662d4b2ff1561a04ae709157b89def Mon Sep 17 00:00:00 2001 From: ZarothYe Date: Fri, 25 Feb 2022 12:14:44 -0600 Subject: [PATCH] Turn std::strings into char* before doing PyObject_CallMethod with them --- Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp index f32d64d5..5518bd5c 100644 --- a/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp @@ -2792,7 +2792,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg) plProfile_BeginTiming(PythonUpdate); PyObject* retVal = PyObject_CallMethod( fPyFunctionInstances[kfunc_OnSubtitleMsg], fFunctionNames[kfunc_OnSubtitleMsg], - "ss", pSubMsg->GetText(), pSubMsg->GetSpeaker()); + "ss", pSubMsg->GetText().c_str(), pSubMsg->GetSpeaker().c_str()); if (retVal == nil) { #ifndef PLASMA_EXTERNAL_RELEASE