File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 5. publish-release.yml GitHub Actions workflow
1111 -->
1212 <TargetFramework >net10.0</TargetFramework >
13- <Version >0.37.1.42 </Version >
13+ <Version >0.37.1.43 </Version >
1414 <UseRidGraph >true</UseRidGraph >
1515
1616 <!--
Original file line number Diff line number Diff line change 11using Marsey . Config ;
2+ using System ;
3+ using System . Text . RegularExpressions ;
24
35namespace Marsey . Stealthsey ;
46
57public static class Abjure
68{
79 private static Version ? engineVer { get ; set ; }
810
9- /// <summary>
10- /// Checks against version with detection methods
11- /// </summary>
12- /// <returns>True if version is equal or over with detection and hidesey is disabled</returns>
1311 public static bool CheckMalbox ( string engineversion , HideLevel MarseyHide )
1412 {
15- engineVer = new Version ( engineversion ) ;
13+ if ( ! TryParseEngineVersion ( engineversion , out var parsed ) )
14+ {
15+ parsed = new Version ( 0 , 0 ) ;
16+ }
17+
18+ engineVer = parsed ;
1619
1720 return engineVer >= MarseyVars . Detection && MarseyHide == HideLevel . Disabled ;
1821 }
22+
23+ private static bool TryParseEngineVersion ( string engineVersion , out Version ? parsed )
24+ {
25+ if ( Version . TryParse ( engineVersion , out var direct ) )
26+ {
27+ parsed = direct ;
28+ return true ;
29+ }
30+
31+ var match = Regex . Match ( engineVersion , @"\d+(\.\d+)+" ) ;
32+
33+ if ( match . Success && Version . TryParse ( match . Value , out var extracted ) )
34+ {
35+ parsed = extracted ;
36+ return true ;
37+ }
38+
39+ parsed = null ;
40+ return false ;
41+ }
1942}
You can’t perform that action at this time.
0 commit comments