aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--code/game/q_shared.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/code/game/q_shared.c b/code/game/q_shared.c
index 6d35493..928332f 100644
--- a/code/game/q_shared.c
+++ b/code/game/q_shared.c
@@ -180,11 +180,10 @@ typedef union {
} _FloatByteUnion;
float FloatSwap (const float *f) {
- const _FloatByteUnion *in;
_FloatByteUnion out;
- in = (_FloatByteUnion *)f;
- out.i = LongSwap(in->i);
+ out.f = *f;
+ out.i = LongSwap(out.i);
return out.f;
}