summaryrefslogtreecommitdiff
path: root/src/events/mouse_event.c
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2012-03-24 09:41:34 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2012-03-24 09:41:34 +0000
commit81c06a1c10903aaaab877945208825c7244e7b7a (patch)
treea4be6838c3ffd1b837f743db4a8e505520adac03 /src/events/mouse_event.c
parent8a96fb5802b83e5194e538017ff106014712715f (diff)
downloadlibdom-81c06a1c10903aaaab877945208825c7244e7b7a.tar.gz
libdom-81c06a1c10903aaaab877945208825c7244e7b7a.tar.bz2
C89 for BeOS build.
svn path=/trunk/libdom/; revision=13581
Diffstat (limited to 'src/events/mouse_event.c')
-rw-r--r--src/events/mouse_event.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/events/mouse_event.c b/src/events/mouse_event.c
index 68e21bc..a2a97bb 100644
--- a/src/events/mouse_event.c
+++ b/src/events/mouse_event.c
@@ -224,13 +224,16 @@ dom_exception _dom_mouse_event_get_related_target(dom_mouse_event *evt,
dom_exception _dom_mouse_event_get_modifier_state(dom_mouse_event *evt,
dom_string *m, bool *state)
{
+ const char *data;
+ size_t len;
+
if (m == NULL) {
*state = false;
return DOM_NO_ERR;
}
- const char *data = dom_string_data(m);
- size_t len = dom_string_byte_length(m);
+ data = dom_string_data(m);
+ len = dom_string_byte_length(m);
if (len == SLEN("AltGraph") && strncmp(data, "AltGraph", len) == 0) {
*state = ((evt->modifier_state & DOM_MOD_ALT_GRAPH) != 0);