Browse Source

Correct PuTTY version extraction for Development snapshots

Source commit: 90c37a342806a0ed9979f8798b1ade865474c468
Martin Prikryl 9 years ago
parent
commit
ef850ef666
1 changed files with 3 additions and 2 deletions
  1. 3 2
      source/core/PuttyIntf.cpp

+ 3 - 2
source/core/PuttyIntf.cpp

@@ -747,8 +747,9 @@ UnicodeString __fastcall GetPuTTYVersion()
   // "Release 0.64"
   // "Pre-release 0.65:2015-07-20.95501a1"
   UnicodeString Result = get_putty_version();
-  // Skip "Release" (or "Pre-release")
-  CutToChar(Result, L' ', true);
+  // Skip "Release", "Pre-release", "Development snapshot"
+  int P = Result.LastDelimiter(L" ");
+  Result.Delete(1, P);
   return Result;
 }
 //---------------------------------------------------------------------------