diff --git a/net/tftp.c b/net/tftp.c
index ce6ea3d9f5ae126678f7e61192ef83aa13a74bb2..3dac3d8531b0580156fc6ec938f8c4eae9257e1f 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -499,9 +499,8 @@ TftpStart (void)
 			strncpy(tftp_filename, BootFile, MAX_LEN);
 			tftp_filename[MAX_LEN-1] = 0;
 		} else {
-			*p++ = '\0';
 			TftpServerIP = string_to_ip (BootFile);
-			strncpy(tftp_filename, p, MAX_LEN);
+			strncpy(tftp_filename, p + 1, MAX_LEN);
 			tftp_filename[MAX_LEN-1] = 0;
 		}
 	}