You are not logged in.
fixing:
function StringToGUID(const text: string): TGUID;
{$ifdef UNICODE}
var tmp: array[0..{+}36{+.}] of byte;// ******** +1 ***********
i: integer;
{$endif}
begin
if (length(text)=38) and (text[1]='{') and (text[38]='}') then begin
{$ifdef UNICODE}
for i := 0 to 35 do
tmp[i] := PWordArray(text)[i+1];
{+}tmp[36] := 0;{+.} // ******** +2 ***********
if TextToGUID(@tmp,@result)<>nil then
{$else}
if TextToGUID(@text[2],@result)<>nil then
{$endif}
exit; // conversion OK
end;
fillchar(result,sizeof(result),0);
end;
Offline