mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-15 00:34:05 +09:00
minor change to random_mac()
This commit is contained in:
@@ -103,7 +103,7 @@ std::string random_mac () {
|
||||
octet = (octet << 1) + LOCAL;
|
||||
octet = (octet << 1) + MULTICAST;
|
||||
snprintf(str,3,"%02x",octet);
|
||||
std::string mac_address = str;
|
||||
std::string mac_address(str);
|
||||
for (int i = 1; i < OCTETS; i++) {
|
||||
mac_address = mac_address + ":";
|
||||
octet = rand() % 256;
|
||||
|
||||
Reference in New Issue
Block a user