summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-esound-sink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 1c02cdfd..b18d3258 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -506,6 +506,7 @@ int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
char *t;
const char *espeaker;
+ uint32_t key;
pa_assert(m);
@@ -584,7 +585,9 @@ int pa__init(pa_module*m) {
pa_log("Failed to load cookie");
goto fail;
}
- *(int32_t*) ((uint8_t*) u->write_data + ESD_KEY_LEN) = ESD_ENDIAN_KEY;
+
+ key = ESD_ENDIAN_KEY;
+ memcpy((uint8_t*) u->write_data + ESD_KEY_LEN, &key, sizeof(key));
/* Reserve space for the response */
u->read_data = pa_xmalloc(u->read_length = sizeof(int32_t));