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:
parent
7c87510b34
commit
e40f7f744e
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ static inline void reformat_mac(char *dst, const char *src)
|
||||||
|
|
||||||
sscanf(src, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
|
sscanf(src, "%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
|
||||||
&x1, &x2, &x3, &x4, &x5, &x6);
|
&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);
|
x1, x2, x3, x4, x5, x6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue