1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

perl: increment count of hash returned by API (fix crash when script tries to read hash without making a copy)

This commit is contained in:
Sebastien Helleu
2012-02-20 14:16:17 +01:00
parent 92f79ba54b
commit 78d7c654c8
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ weechat_perl_exec (struct t_plugin_script *script,
break;
case 'h': /* hash */
hash = weechat_perl_hashtable_to_hash (argv[i]);
XPUSHs(sv_2mortal((SV *)hash));
XPUSHs(sv_2mortal(newRV_inc((SV *)hash)));
break;
}
}