From: Ketmar Dark Date: Sun, 24 Apr 2016 01:09:18 +0000 (+0300) Subject: sfs: small fix X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=85e9a9b925d265c5cf047df5ce56848377e41336 sfs: small fix --- diff --git a/src/shared/wadreader.pas b/src/shared/wadreader.pas index b8f14db..54e81b4 100644 --- a/src/shared/wadreader.pas +++ b/src/shared/wadreader.pas @@ -135,7 +135,11 @@ begin 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; @@ -170,9 +174,12 @@ begin 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;