Skip to content

Commit e70f247

Browse files
authored
Merge pull request #8 from mulot/developpement
Developpement
2 parents 36eb680 + 7e0612e commit e70f247

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# SubnetCalc
22
Subnet Calculator for MacOS
33

4-
What's New in version 2.2:
5-
- Change the VLSM Subnet Name by editing the corresponding column
6-
- Display Hosts Range and Broadcast columns in the VLSM view
7-
- Export Hosts Range and Broadcast infos to the CSV file
4+
What's New in version 2.3:
5+
- FLSM subnet ID bug fix
6+
87

98

109

SubnetCalc.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@
401401
CODE_SIGN_IDENTITY = "Mac Developer";
402402
COMBINE_HIDPI_IMAGES = YES;
403403
COPY_PHASE_STRIP = NO;
404-
CURRENT_PROJECT_VERSION = 8;
404+
CURRENT_PROJECT_VERSION = 9;
405405
DEVELOPMENT_TEAM = VNLK894MAE;
406406
ENABLE_HARDENED_RUNTIME = YES;
407407
GCC_DYNAMIC_NO_PIC = NO;
@@ -411,7 +411,7 @@
411411
INFOPLIST_FILE = "SubnetCalc-Info.plist";
412412
INSTALL_PATH = "$(HOME)/Applications";
413413
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
414-
MARKETING_VERSION = 2.2;
414+
MARKETING_VERSION = 2.3;
415415
PRODUCT_BUNDLE_IDENTIFIER = net.mulot.subnetcalc;
416416
PRODUCT_NAME = SubnetCalc;
417417
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -430,7 +430,7 @@
430430
CODE_SIGN_ENTITLEMENTS = SubnetCalc.entitlements;
431431
CODE_SIGN_IDENTITY = "Mac Developer";
432432
COMBINE_HIDPI_IMAGES = YES;
433-
CURRENT_PROJECT_VERSION = 8;
433+
CURRENT_PROJECT_VERSION = 9;
434434
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
435435
DEVELOPMENT_TEAM = VNLK894MAE;
436436
ENABLE_HARDENED_RUNTIME = YES;
@@ -439,7 +439,7 @@
439439
INFOPLIST_FILE = "SubnetCalc-Info.plist";
440440
INSTALL_PATH = /Applications;
441441
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
442-
MARKETING_VERSION = 2.2;
442+
MARKETING_VERSION = 2.3;
443443
PRODUCT_BUNDLE_IDENTIFIER = net.mulot.subnetcalc;
444444
PRODUCT_NAME = SubnetCalc;
445445
PROVISIONING_PROFILE_SPECIFIER = "";

SubnetCalcAppDelegate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ class SubnetCalcAppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate,
815815
}
816816
else if (tableView == viewFLSM) {
817817
//print("refresh View FLSM")
818-
var ipaddr: UInt32 = ((IPSubnetCalc.numerize(ipAddress: ipsc!.ipv4Address) & ipsc!.classMask()) >> (32 - ipsc!.maskBits)) << (32 - ipsc!.maskBits)
818+
var ipaddr: UInt32 = ((IPSubnetCalc.numerize(ipAddress: ipsc!.ipv4Address) & IPSubnetCalc.numerize(maskbits: ipsc!.maskBits)) >> (32 - ipsc!.maskBits)) << (32 - ipsc!.maskBits)
819819
ipaddr = (ipaddr >> (32 - (ipsc!.maskBits + slideFLSM.integerValue)) + UInt32(row)) << (32 - (ipsc!.maskBits + slideFLSM.integerValue))
820820
let ipsc_tmp = IPSubnetCalc(ipAddress: IPSubnetCalc.digitize(ipAddress: ipaddr), maskbits: (ipsc!.maskBits + slideFLSM.integerValue))
821821
if (tableColumn != nil && ipsc_tmp != nil) {
@@ -1169,7 +1169,7 @@ class SubnetCalcAppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate,
11691169
let cvsFile = FileHandle(forWritingAtPath: panel.url!.path)
11701170
if (cvsFile != nil) {
11711171
var cvsStr = "#;Subnet ID;Mask bits;Range;Broadcast\n"
1172-
let subnetid: UInt32 = ((IPSubnetCalc.numerize(ipAddress: self.ipsc!.ipv4Address) & self.ipsc!.classMask()) >> (32 - self.ipsc!.maskBits)) << (32 - self.ipsc!.maskBits)
1172+
let subnetid: UInt32 = ((IPSubnetCalc.numerize(ipAddress: self.ipsc!.ipv4Address) & IPSubnetCalc.numerize(maskbits: self.ipsc!.maskBits)) >> (32 - self.ipsc!.maskBits)) << (32 - self.ipsc!.maskBits)
11731173
for index in (0...(Int(truncating: NSDecimalNumber(decimal: pow(2, self.slideFLSM.integerValue))) - 1)) {
11741174
let ipaddr = (subnetid >> (32 - (self.ipsc!.maskBits + self.slideFLSM.integerValue)) + UInt32(index)) << (32 - (self.ipsc!.maskBits + self.slideFLSM.integerValue))
11751175
let ipsc_tmp = IPSubnetCalc(ipAddress: IPSubnetCalc.digitize(ipAddress: ipaddr), maskbits: (self.ipsc!.maskBits + self.slideFLSM.integerValue))

0 commit comments

Comments
 (0)