]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.c
fix C++ compile error
[xonotic/darkplaces.git] / prvm_cmds.c
index f18bff240593b002c78ca067658b465b9e476374..ce69930696e73b27c95feab656790afccbfc0de8 100644 (file)
@@ -36,7 +36,7 @@ void VM_Warning(prvm_prog_t *prog, const char *fmt, ...)
        if(prvm_backtraceforwarnings.integer && recursive != realtime) // NOTE: this compares to the time, just in case if PRVM_PrintState causes a Host_Error and keeps recursive set
        {
                recursive = realtime;
-               PRVM_PrintState(prog);
+               PRVM_PrintState(prog, 0);
                recursive = -1;
        }
 }
@@ -6075,6 +6075,7 @@ typedef struct
        double starttime;
        float id;
        char buffer[MAX_INPUTLINE];
+       char posttype[128];
        unsigned char *postdata; // free when uri_to_prog_t is freed
        size_t postlen;
        char *sigdata; // free when uri_to_prog_t is freed
@@ -6234,7 +6235,8 @@ void VM_uri_get (prvm_prog_t *prog)
                        handle->sigdata[handle->siglen] = 0;
                }
 out1:
-               ret = Curl_Begin_ToMemory_POST(url, handle->sigdata, 0, posttype, handle->postdata, handle->postlen, (unsigned char *) handle->buffer, sizeof(handle->buffer), uri_to_string_callback, handle);
+               strlcpy(handle->posttype, posttype, sizeof(handle->posttype));
+               ret = Curl_Begin_ToMemory_POST(url, handle->sigdata, 0, handle->posttype, handle->postdata, handle->postlen, (unsigned char *) handle->buffer, sizeof(handle->buffer), uri_to_string_callback, handle);
        }
        else
        {
@@ -6640,18 +6642,18 @@ nolength:
                                        if(flags & PRINTF_LEFT) *f++ = '-';
                                        if(flags & PRINTF_SPACEPOSITIVE) *f++ = ' ';
                                        if(flags & PRINTF_SIGNPOSITIVE) *f++ = '+';
-                                       if(*s == 'd' || *s == 'i' || *s == 'o' || *s == 'u' || *s == 'x' || *s == 'X')
-                                       {
-                                               // make it use a good integer type
-                                               for(p = INT_LOSSLESS_FORMAT_SIZE; *p; )
-                                                       *f++ = *p++;
-                                       }
                                        *f++ = '*';
                                        if(precision >= 0)
                                        {
                                                *f++ = '.';
                                                *f++ = '*';
                                        }
+                                       if(*s == 'd' || *s == 'i' || *s == 'o' || *s == 'u' || *s == 'x' || *s == 'X')
+                                       {
+                                               // make it use a good integer type
+                                               for(p = INT_LOSSLESS_FORMAT_SIZE; *p; )
+                                                       *f++ = *p++;
+                                       }
                                        *f++ = *s;
                                        *f++ = 0;