We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a4390e1 + da22765 commit 8ce7515Copy full SHA for 8ce7515
src/utl/src/decode.cpp
@@ -116,12 +116,15 @@ std::string base64_decode(const char* encoded_strings[])
116
void evalTclInit(Tcl_Interp* interp, const char* inits[])
117
{
118
std::string unencoded = base64_decode(inits);
119
- if (Tcl_Eval(interp, unencoded.c_str()) != TCL_OK) {
+ Tcl_Obj* obj = Tcl_NewStringObj(unencoded.c_str(), unencoded.size());
120
+ Tcl_IncrRefCount(obj);
121
+ if (Tcl_EvalObjEx(interp, obj, 0) != TCL_OK) {
122
Tcl_Eval(interp, "$errorInfo");
123
const char* tcl_err = Tcl_GetStringResult(interp);
124
fprintf(stderr, "Error: TCL init script: %s.\n", tcl_err);
125
exit(1);
126
}
127
+ Tcl_DecrRefCount(obj);
128
129
130
} // namespace utl
0 commit comments