-Changed func_t from int to unsigned int - probably this breaks some things
but at least it fixes an annoying crash of the DP with the current Nexuiz
build.
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4829
d7cf8633-e32d-0410-b094-
e92efae38249
if( realtime - video->lasttime > CLTHRESHOLD )
SuspendVideo( video );
else if( video->state == CLVIDEO_PAUSE )
- video->starttime = realtime + video->framenum * video->framerate;
+ video->starttime = realtime - video->framenum * video->framerate;
else
VideoFrame( video );
#ifndef PR_COMP_H
#define PR_COMP_H
-typedef int func_t;
+typedef unsigned int func_t;
typedef int string_t;
typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer} etype_t;
startprofile = profile;
pr_xstatement = st - pr_statements;
pr_argc = st->op - OP_CALL0;
- if (!OPA->function)
+ if (!OPA->function )
Host_Error("NULL function");
+ else if (OPA->function > (unsigned) progs->numfunctions)
+ Host_Error("Bad function number");
newf = &pr_functions[OPA->function];