diff options
author | Michael Turvey <mwturvey@users.noreply.github.com> | 2018-03-10 23:31:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-10 23:31:28 -0700 |
commit | 8eea660564e8fa9e1f5f01a278e1df9898694975 (patch) | |
tree | 504786ff79dcac436229e7c6e6a97ae305a38293 /src/ootx_decoder.c | |
parent | c3f6a9a94575035b4226fc646989d561efe5c3f4 (diff) | |
parent | 8ef086fb0524f8d9958de96276790952562902ef (diff) | |
download | libsurvive-8eea660564e8fa9e1f5f01a278e1df9898694975.tar.gz libsurvive-8eea660564e8fa9e1f5f01a278e1df9898694975.tar.bz2 |
Merge pull request #108 from mwturvey/fix_save_restore_LH_POS
Fix MSVC & Fix Saving & Restoring PositionSet bit
Diffstat (limited to 'src/ootx_decoder.c')
-rw-r--r-- | src/ootx_decoder.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ootx_decoder.c b/src/ootx_decoder.c index b7327d5..0620284 100644 --- a/src/ootx_decoder.c +++ b/src/ootx_decoder.c @@ -182,10 +182,15 @@ union iFloat { float f; }; - +#ifndef _MSC_VER struct __attribute__((__packed__)) unaligned_u16_t { uint16_t v; }; +#else +struct unaligned_u16_t { + uint16_t v; +}; +#endif float _half_to_float(uint8_t* data) { uint16_t x = ((struct unaligned_u16_t*)data)->v; |