Merge pull request #4 from helloworld0xf/master

Use replace strtol s to tmp
This commit is contained in:
Luca Deri 2017-07-04 09:20:35 +02:00 committed by GitHub
commit 21055550f3

2
n2n.c
View File

@ -386,7 +386,7 @@ static uint8_t hex2byte( const char * s )
tmp[1]=s[1]; tmp[1]=s[1];
tmp[2]=0; /* NULL term */ tmp[2]=0; /* NULL term */
return((uint8_t)strtol( s, NULL, 16 )); return((uint8_t)strtol( tmp, NULL, 16 ));
} }
extern int str2mac( uint8_t * outmac /* 6 bytes */, const char * s ) extern int str2mac( uint8_t * outmac /* 6 bytes */, const char * s )