Browse Source

FIX: Check string length in cm_ToggleSelectionInName (fixes #1030) (#1031)

Hermholtz 2 years ago
parent
commit
5cd1e33cd2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/fcopymovedlg.pas

+ 3 - 0
src/fcopymovedlg.pas

@@ -173,6 +173,9 @@ begin
   iInitialStart := edtDst.SelStart;
   iInitialLength := edtDst.SelLength;
 
+  if iFullLength = 0 then
+    exit;
+
   repeat
     FCurrentCopyDlgNameSelectionStep := TCurrentCopyDlgNameSelectionStep((ord(FCurrentCopyDlgNameSelectionStep)+1) mod ord(ccdnssInvalid));