mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 12:22:26 +00:00
cleanup some silly more warnings
This commit is contained in:
parent
5a0d645ede
commit
fb3af2831b
1 changed files with 6 additions and 3 deletions
9
exec.cpp
9
exec.cpp
|
@ -113,7 +113,8 @@ qc_program_t* prog_load(const char *filename, bool skipversion)
|
||||||
/* spawn the world entity */
|
/* spawn the world entity */
|
||||||
prog->entitypool.emplace_back(true);
|
prog->entitypool.emplace_back(true);
|
||||||
prog->entitydata.resize(prog->entityfields);
|
prog->entitydata.resize(prog->entityfields);
|
||||||
memset(prog->entitydata.data(), 0, sizeof(prog->entitydata[0]) * prog->entityfields);
|
if (prog->entitydata.size())
|
||||||
|
memset(prog->entitydata.data(), 0, sizeof(prog->entitydata[0]) * prog->entityfields);
|
||||||
prog->entities = 1;
|
prog->entities = 1;
|
||||||
|
|
||||||
/* cache some globals and fields from names */
|
/* cache some globals and fields from names */
|
||||||
|
@ -517,8 +518,10 @@ static qcint_t prog_leavefunction(qc_program_t *prog) {
|
||||||
oldsp = prog->stack[prog->stack.size()-1].localsp;
|
oldsp = prog->stack[prog->stack.size()-1].localsp;
|
||||||
#endif
|
#endif
|
||||||
if (prev) {
|
if (prev) {
|
||||||
qcint_t *globals = &prog->globals[0] + prev->firstlocal;
|
if (prev->locals) {
|
||||||
memcpy(globals, &prog->localstack[oldsp], prev->locals * sizeof(prog->localstack[0]));
|
qcint_t *globals = &prog->globals[0] + prev->firstlocal;
|
||||||
|
memcpy(globals, &prog->localstack[oldsp], prev->locals * sizeof(prog->localstack[0]));
|
||||||
|
}
|
||||||
prog->localstack.resize(oldsp);
|
prog->localstack.resize(oldsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue