]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_exec.c
chnage "negative zero" check to actually check the bit pattern of IEEE negative zeros...
[xonotic/darkplaces.git] / prvm_exec.c
index 8bb0d77a6fb230ff6797dac7bb37565b7a418574..af50433f66c17ab2baf658110a3bf37cd9606b3b 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;
        }
 
@@ -297,7 +297,7 @@ void PRVM_ShortStackTrace(char *buf, size_t bufsize)
 }
 
 
-void PRVM_CallProfile ()
+void PRVM_CallProfile (void)
 {
        mfunction_t *f, *best;
        int i;
@@ -424,7 +424,7 @@ void PRVM_Profile_f (void)
        PRVM_End;
 }
 
-void PRVM_CrashAll()
+void PRVM_CrashAll(void)
 {
        int i;
        prvm_prog_t *oldprog = prog;
@@ -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++)
@@ -452,10 +456,6 @@ void PRVM_PrintState(void)
        else
                Con_Print("null function executing??\n");
        PRVM_StackTrace ();
-       if(prog->statestring)
-       {
-               Con_Printf("Additional information: %s\n", prog->statestring);
-       }
 }
 
 extern sizebuf_t vm_tempstringsbuf;