From 6fa887de8d3826649b5ac1e848d66bcd14e85e62 Mon Sep 17 00:00:00 2001 From: Sergey Abramchuk Date: Mon, 20 Mar 2017 21:56:47 +0300 Subject: [PATCH] Fix format of returned subnet mask --- OpenVPN Adapter/OpenVPNAdapter.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenVPN Adapter/OpenVPNAdapter.mm b/OpenVPN Adapter/OpenVPNAdapter.mm index d847d83..d98ad7a 100644 --- a/OpenVPN Adapter/OpenVPNAdapter.mm +++ b/OpenVPN Adapter/OpenVPNAdapter.mm @@ -565,7 +565,7 @@ static void socketCallback(CFSocketRef socket, CFSocketCallBackType type, CFData uint8_t third = (bitmask >> 8) & 0xFF; uint8_t fourth = bitmask & 0xFF; - return [NSString stringWithFormat:@"%uc.%uc.%uc.%uc", first, second, third, fourth]; + return [NSString stringWithFormat:@"%hhu.%hhu.%hhu.%hhu", first, second, third, fourth]; } #pragma mark Deallocation