summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d5d8de)
raw | patch | inline | side by side (parent: 6d5d8de)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 24 Apr 2016 01:09:18 +0000 (04:09 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 24 Apr 2016 01:41:02 +0000 (04:41 +0300) |
src/shared/wadreader.pas | patch | blob | history |
index b8f14db952daaa900e0a6e85ce8d669519ad3c7f..54e81b433e3df56024c4f12d61faa4691e4acca0 100644 (file)
--- a/src/shared/wadreader.pas
+++ b/src/shared/wadreader.pas
if (lastSlash < 0) and (resourceStr[f] = '\') or (resourceStr[f] = '/') then lastSlash := f;
if resourceStr[f] = ':' then
begin
- if lastSlash > 0 then result := normSlashes(Copy(resourceStr, f, lastSlash-f));
+ if lastSlash > 0 then
+ begin
+ result := normSlashes(Copy(resourceStr, f, lastSlash-f));
+ while (length(result) > 0) and (result[1] = '/') do Delete(result, 1, 1);
+ end;
exit;
end;
end;
if resourceStr[f] = ':' then
begin
result := normSlashes(Copy(resourceStr, f+1, length(resourceStr)));
+ while (length(result) > 0) and (result[1] = '/') do Delete(result, 1, 1);
exit;
end;
end;
+ result := normSlashes(resourceStr);
+ while (length(result) > 0) and (result[1] = '/') do Delete(result, 1, 1);
end;