summaryrefslogtreecommitdiff
path: root/src/client/libmumblelink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/libmumblelink.c')
-rw-r--r--src/client/libmumblelink.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client/libmumblelink.c b/src/client/libmumblelink.c
index 1b1e521e..10e90011 100644
--- a/src/client/libmumblelink.c
+++ b/src/client/libmumblelink.c
@@ -112,6 +112,7 @@ int mumble_link(const char* name)
}
close(shmfd);
#endif
+ memset(lm, 0, sizeof(LinkedMem));
mbstowcs(lm->name, name, sizeof(lm->name));
return 0;
@@ -128,12 +129,12 @@ void mumble_update_coordinates2(float fAvatarPosition[3], float fAvatarFront[3],
if (!lm)
return;
- memcpy(lm->fAvatarPosition, fAvatarPosition, sizeof(fAvatarPosition));
- memcpy(lm->fAvatarFront, fAvatarFront, sizeof(fAvatarFront));
- memcpy(lm->fAvatarTop, fAvatarTop, sizeof(fAvatarTop));
- memcpy(lm->fCameraPosition, fCameraPosition, sizeof(fCameraPosition));
- memcpy(lm->fCameraFront, fCameraFront, sizeof(fCameraFront));
- memcpy(lm->fCameraTop, fCameraTop, sizeof(fCameraTop));
+ memcpy(lm->fAvatarPosition, fAvatarPosition, sizeof(lm->fAvatarPosition));
+ memcpy(lm->fAvatarFront, fAvatarFront, sizeof(lm->fAvatarFront));
+ memcpy(lm->fAvatarTop, fAvatarTop, sizeof(lm->fAvatarTop));
+ memcpy(lm->fCameraPosition, fCameraPosition, sizeof(lm->fCameraPosition));
+ memcpy(lm->fCameraFront, fCameraFront, sizeof(lm->fCameraFront));
+ memcpy(lm->fCameraTop, fCameraTop, sizeof(lm->fCameraTop));
lm->uiVersion = 2;
lm->uiTick = GetTickCount();
}
@@ -152,6 +153,7 @@ void mumble_set_context(const unsigned char* context, size_t len)
if (!lm)
return;
len = MIN(sizeof(lm->context), len);
+ lm->context_len = len;
memcpy(lm->context, context, len);
}