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;
}
}
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
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
{
const char *s, *s0;
char outbuf[MAX_INPUTLINE];
char *o = outbuf, *end = outbuf + sizeof(outbuf), *err;
+ const char *p;
int argpos = 1;
int width, precision, thisarg, flags;
char formatbuf[16];
*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;
{
case 'd': case 'i':
if(precision < 0) // not set
- o += dpsnprintf(o, end - o, formatbuf, width, (isfloat ? (int) GETARG_FLOAT(thisarg) : (int) GETARG_INT(thisarg)));
+ o += dpsnprintf(o, end - o, formatbuf, width, (isfloat ? INT_LOSSLESS_FORMAT_CONVERT_S(GETARG_FLOAT(thisarg)) : INT_LOSSLESS_FORMAT_CONVERT_S(GETARG_INT(thisarg))));
else
- o += dpsnprintf(o, end - o, formatbuf, width, precision, (isfloat ? (int) GETARG_FLOAT(thisarg) : (int) GETARG_INT(thisarg)));
+ o += dpsnprintf(o, end - o, formatbuf, width, precision, (isfloat ? INT_LOSSLESS_FORMAT_CONVERT_S(GETARG_FLOAT(thisarg)) : INT_LOSSLESS_FORMAT_CONVERT_S(GETARG_INT(thisarg))));
break;
case 'o': case 'u': case 'x': case 'X':
if(precision < 0) // not set
- o += dpsnprintf(o, end - o, formatbuf, width, (isfloat ? (unsigned int) GETARG_FLOAT(thisarg) : (unsigned int) GETARG_INT(thisarg)));
+ o += dpsnprintf(o, end - o, formatbuf, width, (isfloat ? INT_LOSSLESS_FORMAT_CONVERT_U(GETARG_FLOAT(thisarg)) : INT_LOSSLESS_FORMAT_CONVERT_U(GETARG_INT(thisarg))));
else
- o += dpsnprintf(o, end - o, formatbuf, width, precision, (isfloat ? (unsigned int) GETARG_FLOAT(thisarg) : (unsigned int) GETARG_INT(thisarg)));
+ o += dpsnprintf(o, end - o, formatbuf, width, precision, (isfloat ? INT_LOSSLESS_FORMAT_CONVERT_U(GETARG_FLOAT(thisarg)) : INT_LOSSLESS_FORMAT_CONVERT_U(GETARG_INT(thisarg))));
break;
case 'e': case 'E': case 'f': case 'F': case 'g': case 'G':
if(precision < 0) // not set