Commit 26c2a8df authored by Andrew Price's avatar Andrew Price
Browse files

Fix a format overflow warning

On gcc 7:

edit.c: In function ‘edit_user’:
edit.c:391:24: error: ‘sprintf’ writing a terminating nul past the end of the destination [-Werror=format-overflow=]
    sprintf(text, "s%05d", newroom);
parent 240518f4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ void edit_user(const char *args, const char *name)
	if (stringcmp(args,"room",2))
	{
		char	room[5];
		char	text[6];
		char	text[7];
		int	newroom;
		int	oldroom;