1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

shared: format MAC with leading zeros

Don't skip leading zeroes for MAC addresses. Some software cannot handle
this well.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
Andrey Gusakov 2014-08-11 22:13:03 +04:00 committed by David Herrmann
parent 7c87510b34
commit e40f7f744e

View file

@ -107,7 +107,7 @@ static inline void reformat_mac(char *dst, const char *src)
sscanf(src, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
&x1, &x2, &x3, &x4, &x5, &x6);
sprintf(dst, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
sprintf(dst, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
x1, x2, x3, x4, x5, x6);
}