Fixes issue #975

This commit is contained in:
Richard Berger
2018-06-29 16:00:08 -04:00
parent c3fe26a614
commit a8b7153f4e

View File

@ -344,7 +344,7 @@ void PythonImpl::invoke_function(int ifunc, char *result)
} else if (otype == DOUBLE) {
sprintf(result,"%.15g",PyFloat_AsDouble(pValue));
} else if (otype == STRING) {
char *pystr = PY_STRING_AS_STRING(pValue);
const char *pystr = PY_STRING_AS_STRING(pValue);
if (pfuncs[ifunc].longstr)
strncpy(pfuncs[ifunc].longstr,pystr,pfuncs[ifunc].length_longstr);
else strncpy(result,pystr,VALUELENGTH-1);