summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-27 17:36:05 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-27 17:36:05 +0100
commitaee9a2f168d95e1416344220e28f2acd3ec7245b (patch)
tree673444fc134baf52d0b52362934e32ac24fe4ceb
parent13b59a8a1abb2a00040d663dd2d5765aeed1a39a (diff)
ftclient: copy the data actual
Issue: #97
-rw-r--r--freetrackclient/freetrackclient.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/freetrackclient/freetrackclient.c b/freetrackclient/freetrackclient.c
index 7fba2cee..8e6c2b7f 100644
--- a/freetrackclient/freetrackclient.c
+++ b/freetrackclient/freetrackclient.c
@@ -75,11 +75,9 @@ FT_EXPORT(BOOL) FTGetData(FTData* data)
return FALSE;
if (ipc_mutex && WaitForSingleObject(ipc_mutex, 16) == WAIT_OBJECT_0) {
- if (ipc_heap) {
- if (ipc_heap->data.DataID > (1 << 29))
- ipc_heap->data.DataID = 0;
- data->DataID = ipc_heap->data.DataID;
- }
+ memcpy(data, &ipc_heap->data, sizeof(FTData));
+ if (ipc_heap->data.DataID > (1 << 29))
+ ipc_heap->data.DataID = 0;
ReleaseMutex(ipc_mutex);
}
return TRUE;