Fix pkt_mkopt

This commit is contained in:
Joseph C. Lehner 2017-05-31 16:11:49 +02:00
parent 65f5cabd86
commit 30d1e63c6c

2
tftp.c
View file

@ -72,7 +72,7 @@ static inline uint16_t pkt_num(char *pkt)
static char *pkt_mkopt(char *pkt, const char *opt, const char* val)
{
strcpy(pkt, opt);
pkt += strlen(pkt) + 1;
pkt += strlen(opt) + 1;
strcpy(pkt, val);
pkt += strlen(val) + 1;
return pkt;