diff options
Diffstat (limited to 'code/client')
-rw-r--r-- | code/client/cl_cgame.c | 8 | ||||
-rw-r--r-- | code/client/cl_ui.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c index 615884f..ef15798 100644 --- a/code/client/cl_cgame.c +++ b/code/client/cl_cgame.c @@ -400,11 +400,9 @@ void CL_ShutdownCGame( void ) { } static int FloatAsInt( float f ) { - int temp; - - *(float *)&temp = f; - - return temp; + floatint_t fi; + fi.f = f; + return fi.i; } /* diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c index 3cabd04..56a226b 100644 --- a/code/client/cl_ui.c +++ b/code/client/cl_ui.c @@ -691,11 +691,9 @@ FloatAsInt ==================== */ static int FloatAsInt( float f ) { - int temp; - - *(float *)&temp = f; - - return temp; + floatint_t fi; + fi.f = f; + return fi.i; } /* |