Fixed a small stack problem with timeofday string

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@810 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-01-18 15:49:57 +00:00
parent 85110f82db
commit 71dd0f167d

View file

@ -5984,6 +5984,7 @@ void PF_calltimeofday (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
date_t date;
func_t f;
char *ret = PF_TempStr();
f = PR_FindFunction(svprogfuncs, "timeofday", PR_ANY);
if (f)
@ -5996,7 +5997,8 @@ void PF_calltimeofday (progfuncs_t *prinst, struct globalvars_s *pr_globals)
G_FLOAT(OFS_PARM3) = (float)date.day;
G_FLOAT(OFS_PARM4) = (float)date.mon;
G_FLOAT(OFS_PARM5) = (float)date.year;
G_INT(OFS_PARM6) = (int)PR_SetString(prinst, date.str);
strcpy(ret, date.str);
G_INT(OFS_PARM6) = (int)PR_SetString(prinst, ret);
PR_ExecuteProgram(prinst, f);
}