Merge branch 'develop' of github.com:ennorehling/eressea into develop

This commit is contained in:
Enno Rehling 2019-09-22 13:51:23 +02:00
commit c1a36a0963
1 changed files with 6 additions and 5 deletions

View File

@ -1080,7 +1080,7 @@ static void report_region_schemes(struct stream *out, const region * r, faction
} }
else if (num > 1) { else if (num > 1) {
int i; int i;
char *rnames[MAX_SCHEMES]; const char *rnames[MAX_SCHEMES];
for (i = 0; i != num; ++i) { for (i = 0; i != num; ++i) {
char rbuf[REPORTWIDTH]; char rbuf[REPORTWIDTH];
@ -1090,16 +1090,17 @@ static void report_region_schemes(struct stream *out, const region * r, faction
} }
report_list(f->locale, buf, sizeof(buf), num, rnames); report_list(f->locale, buf, sizeof(buf), num, rnames);
for (i = 0; i != num; ++i) { for (i = 0; i != num; ++i) {
free(rnames[i]); free((char *)rnames[i]);
} }
} }
if (num > 0) { if (num > 0) {
format_replace(LOC(f->locale, "nr_schemes_template"), "{0}", buf, buf, sizeof(buf)); if (format_replace(LOC(f->locale, "nr_schemes_template"), "{0}", buf, buf, sizeof(buf))) {
newline(out); newline(out);
paragraph(out, buf, 0, 0, 0); paragraph(out, buf, 0, 0, 0);
} }
} }
} }
}
void report_region(struct stream *out, const region * r, faction * f) void report_region(struct stream *out, const region * r, faction * f)
{ {