path: root/plugin/plugin.c
diff options
authorHakan Kvist <>2010-02-19 22:14:48 +0100
committerSamuel Lidén Borell <>2010-02-20 00:03:36 +0100
commit044097f7d6857b8bc91e216ab8a3503a93c89e1d (patch)
tree8e8912a32f31e2849747a077d619c93c60ca25ae /plugin/plugin.c
parentc8464cc1b50d353eb3ab5d5a21fee41957372748 (diff)
Fixed crash on 64 bit platforms.
The npn_getvalue on NPNVnetscapeWindow returns a Window on X11. A X11 Window is defined as an unsigned long. This happends to be 8 bytes on amd64 and 4 bytes on i386 (int is 4 bytes on both amd64 and i386). So prevously the code worked on i386, but not on amd64 where you instead got a SIGSEV. Signed-off-by: Hakan Kvist <>
Diffstat (limited to 'plugin/plugin.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/plugin.c b/plugin/plugin.c
index 4fd3d97..c8d8930 100644
--- a/plugin/plugin.c
+++ b/plugin/plugin.c
@@ -36,8 +36,9 @@ static const char *activeURLs[MAX_WINDOWS];
Plugin *plugin_new(PluginType pluginType, const char *url,
const char *hostname, const char *ip,
- int windowId) {
+ Window windowId) {
Plugin *plugin = calloc(1, sizeof(Plugin));
if (!plugin) return NULL;
plugin->type = pluginType;
plugin->url = strdup(url);