diff --git a/AssetStudio.GUI/Exporter.cs b/AssetStudio.GUI/Exporter.cs index cde49b0..29086d6 100644 --- a/AssetStudio.GUI/Exporter.cs +++ b/AssetStudio.GUI/Exporter.cs @@ -308,7 +308,7 @@ namespace AssetStudio.GUI } if (Properties.Settings.Default.allowDuplicates) { - for (int i = 0; ; i++) + for (int i = 1; i < int.MaxValue; i++) { fullPath = Path.Combine(dir, $"{fileName} ({i}){extension}"); if (!File.Exists(fullPath)) @@ -329,7 +329,7 @@ namespace AssetStudio.GUI } if (Properties.Settings.Default.allowDuplicates) { - for (int i = 0; ; i++) + for (int i = 1; i < int.MaxValue; i++) { fullPath = Path.Combine(dir, $"{fileName} ({i})"); if (!Directory.Exists(fullPath))