1
0
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:
Sebastien Helleu
2013-05-07 08:56:12 +02:00
parent 9f08029361
commit c6fdeaf7e5
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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])
{