From: havoc Date: Sun, 18 May 2008 01:36:14 +0000 (+0000) Subject: fix return value of VM_strftime builtin, it was returning a string X-Git-Tag: xonotic-v0.1.0preview~2235 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=efcea9edbb2694e244d5054cc2e1d003b8f1cb17;p=xonotic%2Fdarkplaces.git fix return value of VM_strftime builtin, it was returning a string offset as a float, it must return it as an int for QC to work git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8298 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_cmds.c b/prvm_cmds.c index 71bebfff..3dd182b2 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -703,11 +703,11 @@ void VM_strftime(void) tm = gmtime(&t); if (!tm) { - PRVM_G_FLOAT(OFS_RETURN) = 0; + PRVM_G_INT(OFS_RETURN) = 0; return; } strftime(result, sizeof(result), fmt, tm); - PRVM_G_FLOAT(OFS_RETURN) = PRVM_SetTempString(result); + PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(result); } /*