mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-26 05:21:45 +01:00
Fix string truncation warnings (Wstringop-truncation) (#53)
This commit is contained in:
@@ -945,7 +945,8 @@ static int export_save_rooms(zone_rnum zrnum)
|
||||
struct extra_descr_data *xdesc;
|
||||
|
||||
for (xdesc = room->ex_description; xdesc; xdesc = xdesc->next) {
|
||||
strncpy(buf, xdesc->description, sizeof(buf));
|
||||
strncpy(buf, xdesc->description, sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
strip_cr(buf);
|
||||
fprintf(room_file, "E\n"
|
||||
"%s~\n"
|
||||
|
||||
Reference in New Issue
Block a user