diff options
Diffstat (limited to '3rdparty/python-console/modified')
-rw-r--r-- | 3rdparty/python-console/modified/pyconsole.cc | 2 | ||||
-rw-r--r-- | 3rdparty/python-console/modified/pyinterpreter.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/3rdparty/python-console/modified/pyconsole.cc b/3rdparty/python-console/modified/pyconsole.cc index 186d74d2..d724553b 100644 --- a/3rdparty/python-console/modified/pyconsole.cc +++ b/3rdparty/python-console/modified/pyconsole.cc @@ -95,7 +95,7 @@ void PythonConsole::parseEvent( const ParseMessage& message ) } // interpret valid user input - int errorCode; + int errorCode = 0; std::string res; if ( message.message.size() ) res = pyinterpreter_execute( message.message, &errorCode ); diff --git a/3rdparty/python-console/modified/pyinterpreter.cc b/3rdparty/python-console/modified/pyinterpreter.cc index ee8c4aa8..f53207ad 100644 --- a/3rdparty/python-console/modified/pyinterpreter.cc +++ b/3rdparty/python-console/modified/pyinterpreter.cc @@ -38,9 +38,9 @@ static std::list<std::string> m_suggestions; template <typename... Args> std::string string_format(const std::string &format, Args... args) { - size_t size = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; // Extra space for '\0' + size_t size = snprintf(nullptr, 0, format.c_str(), args...) + 1; // Extra space for '\0' std::unique_ptr<char[]> buf(new char[size]); - std::snprintf(buf.get(), size, format.c_str(), args...); + snprintf(buf.get(), size, format.c_str(), args...); return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside } |