Zeige

Indexfehler führte zu zu kurzem String.
This commit is contained in:
Enno Rehling 2005-07-04 21:18:42 +00:00
parent 3e73408c86
commit 4b6cbc45c6
1 changed files with 2 additions and 6 deletions

View File

@ -2369,14 +2369,10 @@ display_race(faction *f, unit *u, const race * rc)
bufp += rsize; bufp += rsize;
} }
fclose(fp); fclose(fp);
rsize = strlcpy(bufp, ". ", size);
if (rsize>size) rsize = size-1;
size -= rsize;
bufp += rsize;
} }
/* hp_p : Trefferpunkte */ /* hp_p : Trefferpunkte */
sprintf(buf2, "Trefferpunkte: %d", rc->hitpoints); sprintf(buf2, " %d Trefferpunkte", rc->hitpoints);
rsize = strlcpy(bufp, buf2, size); rsize = strlcpy(bufp, buf2, size);
if (rsize>size) rsize = size-1; if (rsize>size) rsize = size-1;
@ -2386,7 +2382,7 @@ display_race(faction *f, unit *u, const race * rc)
/* b_armor : Rüstung */ /* b_armor : Rüstung */
if (rc->armor > 0){ if (rc->armor > 0){
sprintf(buf2, ", Rüstung: %d", rc->armor); sprintf(buf2, ", Rüstung: %d", rc->armor);
rsize += strlcpy(bufp, buf2, size); rsize = strlcpy(bufp, buf2, size);
if (rsize>size) rsize = size-1; if (rsize>size) rsize = size-1;
size -= rsize; size -= rsize;
bufp += rsize; bufp += rsize;