#1 2015-11-03 22:02:38

kevinday
Member
Registered: 2015-10-28
Posts: 11

Fix for Bug in SynCommons.IdemPCharU()

Hi, 

I found a bug in SynCommons.IdemPCharU().

The corrected code below:

function IdemPCharU(p, up: PUTF8Char): boolean;
begin
  result := false;
  if (p=nil) or (up=nil) then
    exit;
  while up^<>#0 do begin
    if GetNextUTF8Upper(p)<>ord(up^) then
      exit;
    inc(up);
//    inc(p); already incremented by GetNextUTF8Upper()
  end;
  result := true;
end;

Cheers,
Kevin Day

Offline

#2 2015-11-04 08:06:53

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,242
Website

Re: Fix for Bug in SynCommons.IdemPCharU()

should be fixed by http://synopse.info/fossil/info/29e28f7e11

Thanks for the feedback!

Offline

Board footer

Powered by FluxBB