]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_execprogram.h
fixed a crash if decals are stuck to submodels when cl_entities expands
[xonotic/darkplaces.git] / pr_execprogram.h
index e0e9d24ea2bc9782d95b44b0b7a365b032c18ab4..5089e27577f3edf0de80852fb0f58db309171446 100644 (file)
                                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];