mirror of
https://github.com/weechat/weechat.git
synced 2026-06-20 10:04:48 +02:00
python: fix crash when loading scripts with Python 3.x (patch #8044) (thanks to isak)
This commit is contained in:
@@ -618,7 +618,7 @@ weechat_python_load (const char *filename)
|
||||
python_current_interpreter = Py_NewInterpreter ();
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
/* python >= 3.x */
|
||||
len = strlen (argv[0]);
|
||||
len = mbstowcs (NULL, argv[0], 0) + 1;
|
||||
wargv[0] = malloc ((len + 1) * sizeof (wargv[0][0]));
|
||||
if (wargv[0])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user