diff options
-rw-r--r-- | plugins/Utils.pas/common.pas | 7 | ||||
-rw-r--r-- | plugins/Watrack/players/pl_aimp.pas | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/plugins/Utils.pas/common.pas b/plugins/Utils.pas/common.pas index 37146dd0fd..ce0ca4c22d 100644 --- a/plugins/Utils.pas/common.pas +++ b/plugins/Utils.pas/common.pas @@ -130,6 +130,7 @@ procedure LowerCase(src:pWideChar); function StrDup (var dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
function StrDupW(var dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
+function StrEmpty:pointer;
function StrDelete (aStr:PAnsiChar;pos,len:cardinal):PAnsiChar;
function StrDeleteW(aStr:PWideChar;pos,len:cardinal):PWideChar;
function StrInsert (substr,src:PAnsiChar;pos:cardinal):PAnsiChar;
@@ -1592,6 +1593,12 @@ begin result:=dst;
end;
+function StrEmpty:pointer;
+begin
+ mGetMem(result,SizeOf(WideChar));
+ pWord(result)^:=0;
+end;
+
function StrCopyE(dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
var
l:cardinal;
diff --git a/plugins/Watrack/players/pl_aimp.pas b/plugins/Watrack/players/pl_aimp.pas index 1711490e33..410a44d5f0 100644 --- a/plugins/Watrack/players/pl_aimp.pas +++ b/plugins/Watrack/players/pl_aimp.pas @@ -277,7 +277,9 @@ begin StrDupW(artist,
pWideChar(PAnsiChar(pStr)+SizeOf(TAIMP2FileInfo))+
nAlbumLen,nArtistLen);
- end;
+ end
+ else
+ artist:=StrEmpty();
if (album=nil) and (nAlbumLen>0) then
begin
StrDupW(album,
@@ -290,7 +292,9 @@ begin pWideChar(PAnsiChar(pStr)+SizeOf(TAIMP2FileInfo))+
nAlbumLen+nArtistLen+nDateLen+nFileNameLen+nGenreLen,
nTitleLen);
- end;
+ end
+ else
+ title:=StrEmpty();
if (year=nil) and (nDateLen>0) then
begin
StrDupW(year,
|