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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user