odissey: fix id comparator

This commit is contained in:
Dmitry Simonenko 2017-06-20 18:43:46 +03:00
parent a94acec1c8
commit 7dc0f118a4
2 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,7 @@ void od_idmgr_generate(od_idmgr_t*, od_id_t*);
static inline int static inline int
od_idmgr_cmp(od_id_t *a, od_id_t *b) od_idmgr_cmp(od_id_t *a, od_id_t *b)
{ {
return *(uint64_t*)a->id == *(uint64_t*)b->id; return memcmp(a->id, b->id, sizeof(a->id)) == 0;
} }
#endif /* OD_ID_H */ #endif /* OD_ID_H */

View File

@ -9,6 +9,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <machinarium.h> #include <machinarium.h>