summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7827dd)
raw | patch | inline | side by side (parent: c7827dd)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 20 Oct 2019 22:06:34 +0000 (01:06 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 20 Oct 2019 22:07:57 +0000 (01:07 +0300) |
src/shared/utils.pas | patch | blob | history |
diff --git a/src/shared/utils.pas b/src/shared/utils.pas
index a3a650070a1ff1ef05791ee85676edd231259dd1..5c3c7ba57a48fec14645c3e74b1d88f769f1bb45 100644 (file)
--- a/src/shared/utils.pas
+++ b/src/shared/utils.pas
function isWadPath (const fn: AnsiString): Boolean;
var
pos: Integer;
- s: AnsiString;
+ s, wext: AnsiString;
begin
result := false;
pos := 1;
if (pos-4 > 1) and (fn[pos-4] = '.') and ((fn[pos+1] = '\') or (fn[pos+1] = '/')) then
begin
s := Copy(fn, pos-4, 4);
- if StrEquCI1251(s, '.wad') or StrEquCI1251(s, '.pk3') or StrEquCI1251(s, '.zip') or StrEquCI1251(s, '.dfz') then
+ for wext in wadExtensions do
begin
- result := true;
- exit;
+ if strEquCI1251(s, wext) then
+ begin
+ result := true;
+ exit;
+ end;
end;
end;
end;