Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit 4a81c9d

Browse files
committed
Fixed bug in MAC address generator which caused a crash
1 parent 1574374 commit 4a81c9d

File tree

15 files changed

+31
-52
lines changed

15 files changed

+31
-52
lines changed

Installer/ScpToolkit Setup.aip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<ROW Property="ARPURLUPDATEINFO" Value="https://github.com/nefarius/ScpServer/releases"/>
1515
<ROW Property="CTRLS" Value="2"/>
1616
<ROW Property="Manufacturer" Value="Nefarius Software Solutions"/>
17-
<ROW Property="ProductCode" Value="1033:{661E9DB3-3A7F-40C2-BABC-3E779DB6679C} " Type="16"/>
17+
<ROW Property="ProductCode" Value="1033:{CDF94DE2-B29B-4858-BBB8-CC8403FC1920} " Type="16"/>
1818
<ROW Property="ProductLanguage" Value="1033"/>
1919
<ROW Property="ProductName" Value="ScpToolkit"/>
20-
<ROW Property="ProductVersion" Value="1.6.202.15347" Type="32"/>
20+
<ROW Property="ProductVersion" Value="1.6.204.15348" Type="32"/>
2121
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
2222
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
2323
<ROW Property="UpgradeCode" Value="{541750FB-F05E-4F6A-AB9A-69A633D3D681}"/>

ScpCleanWipe/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

ScpControl/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

ScpControl/ScpControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<AssemblyInfoVersionSettings>
2424
</AssemblyInfoVersionSettings>
2525
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
26-
<AssemblyVersion>1.6.202.15347</AssemblyVersion>
26+
<AssemblyVersion>1.6.204.15348</AssemblyVersion>
2727
</PropertyGroup>
2828
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2929
<DebugSymbols>true</DebugSymbols>

ScpControl/Utilities/MacAddressGenerator.cs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,13 @@ public static string NewMacAddress
2222
var b = Convert.ToByte(number);
2323
if (i == 0)
2424
{
25-
b = SetBit(b, 6); //--> set locally administered
26-
b = UnsetBit(b, 7); // --> set unicast
25+
b = (byte) ((b & 0xFE) | 0x02); //-->set locally administered and unicast
2726
}
28-
sBuilder.Append(string.Format("{0}:", number.ToString("X2")));
27+
sBuilder.Append(string.Format("{0}", number.ToString("X2")));
2928
}
3029

31-
return sBuilder.ToString().ToUpper().TrimEnd(':');
30+
return sBuilder.ToString();
3231
}
3332
}
34-
35-
private static byte SetBit(byte b, int bitNumber)
36-
{
37-
if (bitNumber < 8 && bitNumber > -1)
38-
{
39-
return (byte) (b | (byte) (0x01 << bitNumber));
40-
}
41-
42-
throw new ArgumentOutOfRangeException(bitNumber.ToString());
43-
}
44-
45-
private static byte UnsetBit(byte b, int bitNumber)
46-
{
47-
if (bitNumber < 8 && bitNumber > -1)
48-
{
49-
return (byte) (b | (byte) (0x00 << bitNumber));
50-
}
51-
52-
throw new ArgumentOutOfRangeException(bitNumber.ToString());
53-
}
5433
}
55-
}
34+
}

ScpDebugInfoCollector/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

ScpDriverInstaller/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

ScpGamepadAnalyzer/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

ScpMonitor/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

ScpPair/Properties/CommonInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("1.6.202.15347")]
16-
[assembly: AssemblyFileVersion("1.6.202.15347")]
15+
[assembly: AssemblyVersion("1.6.204.15348")]
16+
[assembly: AssemblyFileVersion("1.6.204.15348")]

0 commit comments

Comments
 (0)