]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_exec.c
refactoring as preparation for upcoming optimization
[xonotic/darkplaces.git] / prvm_exec.c
index f644f9fde03996cf21f824074ccc5f83737b3bcb..55a91d92d9438d148fe6312b951aa5181bfd7a86 100644 (file)
@@ -276,7 +276,7 @@ void PRVM_ShortStackTrace(char *buf, size_t bufsize)
        }
        else
        {
-               strlcpy(buf, "<NO PROG>", sizeof(buf));
+               strlcpy(buf, "<NO PROG>", bufsize);
                return;
        }
 
@@ -443,6 +443,10 @@ void PRVM_CrashAll()
 void PRVM_PrintState(void)
 {
        int i;
+       if(prog->statestring)
+       {
+               Con_Printf("Caller-provided information: %s\n", prog->statestring);
+       }
        if (prog->xfunction)
        {
                for (i = -7; i <= 0;i++)
@@ -700,7 +704,7 @@ chooseexecprogram:
                                }
                        }
                }
-#undef PRVMRUNAWAYCHECK 1
+#undef PRVMRUNAWAYCHECK
        }
        else
        {