X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=exec.c;h=b957a83a8722401f76a7e8f723e13f36661844f6;hp=835217cf2ef49c87b5f739ec8237a4a05f799625;hb=b36fabe4d76fce6c1bc8ab1e3c40fe33165747ce;hpb=20831ddc6c0839f7b85d3c717e8a8e0b3fa46838 diff --git a/exec.c b/exec.c index 835217c..b957a83 100644 --- a/exec.c +++ b/exec.c @@ -584,8 +584,11 @@ bool opts_memchk = false; static int qc_print(qc_program *prog) { - qcany *str = (qcany*)(prog->globals + OFS_PARM0); - printf("%s", prog_getstring(prog, str->string)); + size_t i; + for (i = 0; i < prog->argc; ++i) { + qcany *str = (qcany*)(prog->globals + OFS_PARM0 + 3*i); + printf("%s", prog_getstring(prog, str->string)); + } return 0; } @@ -656,6 +659,7 @@ int main(int argc, char **argv) if (!strcmp(name, "main")) fnmain = (qcint)i; } + printf("Entity field space: %i\n", (int)prog->entityfields); if (fnmain > 0) { prog_exec(prog, &prog->functions[fnmain], VMXF_TRACE, VM_JUMPS_DEFAULT);