mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 18:01:13 +00:00
Mintor improvment to the QWE newstr().
This commit is contained in:
parent
d910c14935
commit
15a5f98439
1 changed files with 3 additions and 1 deletions
|
@ -256,8 +256,10 @@ PF_newstr (progs_t *pr)
|
||||||
dstring_copystr (dstr, s);
|
dstring_copystr (dstr, s);
|
||||||
|
|
||||||
if (pr->pr_argc > 1 && P_FLOAT (pr, 1) > dstr->size) {
|
if (pr->pr_argc > 1 && P_FLOAT (pr, 1) > dstr->size) {
|
||||||
dstr->size = P_FLOAT (pr, 1);
|
int s = dstr->size;
|
||||||
|
dstr->size = P_FLOAT (pr, 1) + 1;
|
||||||
dstring_adjust (dstr);
|
dstring_adjust (dstr);
|
||||||
|
memset (dstr->str + s, dstr->size - s, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
R_STRING (pr) = i;
|
R_STRING (pr) = i;
|
||||||
|
|
Loading…
Reference in a new issue