X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=exec.c;h=8df96f01145007c37dc4ca4d9bc23c1bcab1109d;hb=359ba5f728af7498fb7c6952edd75ef62534bd8f;hp=9ba00200ffa78a341feb3dfadf450648cf9727a4;hpb=47f7611ec95ca623591a08fd05baccaff2f2ff4a;p=xonotic%2Fgmqcc.git diff --git a/exec.c b/exec.c index 9ba0020..8df96f0 100644 --- a/exec.c +++ b/exec.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 + * Copyright (C) 2012, 2013 * Wolfgang Bumiller * Dale Weiler * @@ -359,7 +359,7 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype) done: if (len < (int)sizeof(spaces)-1) { spaces[sizeof(spaces)-1-len] = 0; - printf(spaces); + file_puts(stdout, spaces); spaces[sizeof(spaces)-1-len] = ' '; } } @@ -475,7 +475,8 @@ static qcint prog_enterfunction(qc_program *prog, prog_section_function *func) st.function = func; if (prog->xflags & VMXF_TRACE) { - vec_push(prog->function_stack, prog_getstring(prog, func->name)); + const char *str = prog_getstring(prog, func->name); + vec_push(prog->function_stack, str); } #ifdef QCVM_BACKUP_STRATEGY_CALLER_VARS @@ -912,6 +913,8 @@ int main(int argc, char **argv) } else if (!strcmp(argv[1], "-v")) { ++opts_v; + --argc; + ++argv; } else if (!strncmp(argv[1], "-vv", 3)) { const char *av = argv[1]+1;