aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui
diff options
context:
space:
mode:
Diffstat (limited to 'code/ui')
-rw-r--r--code/ui/ui_syscalls.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/code/ui/ui_syscalls.c b/code/ui/ui_syscalls.c
index 77c14eb..9048a95 100644
--- a/code/ui/ui_syscalls.c
+++ b/code/ui/ui_syscalls.c
@@ -35,9 +35,9 @@ void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) {
}
int PASSFLOAT( float x ) {
- float floatTemp;
- floatTemp = x;
- return *(int *)&floatTemp;
+ floatint_t fi;
+ fi.f = x;
+ return fi.i;
}
void trap_Print( const char *string ) {
@@ -65,9 +65,9 @@ void trap_Cvar_Set( const char *var_name, const char *value ) {
}
float trap_Cvar_VariableValue( const char *var_name ) {
- int temp;
- temp = syscall( UI_CVAR_VARIABLEVALUE, var_name );
- return (*(float*)&temp);
+ floatint_t fi;
+ fi.i = syscall( UI_CVAR_VARIABLEVALUE, var_name );
+ return fi.f;
}
void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ) {