From b31e8a67d9b1f11b9943b595a4fd66d3a07dd085 Mon Sep 17 00:00:00 2001 From: ludwig Date: Mon, 3 Nov 2008 17:03:54 +0000 Subject: fix strict aliasing issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Przemysław Iskra (#3805) git-svn-id: svn://svn.icculus.org/quake3/trunk@1481 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_cgame.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'code/client/cl_cgame.c') 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; } /* -- cgit v1.2.3