View Issue Details

IDProjectCategoryView StatusLast Update
0001639JEDI VCL00 JVCL Componentspublic2004-04-15 00:56
ReporteranonymousAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001639: Unit: JvWStrUtils function: StrPosW
DescriptionWideChar search incorrect. After first char found, inital offset for testing remaining string was set to first char again (I = 0), not 2nd (I = 1). cf initial P offset = Result + 1.

Approx line 404 (Unit last modified date: 2004-02-13).

Fix provided here...
Additional Informationfunction StrPosW(S, SubStr: PWideChar): PWideChar;
<snip>
  while Result[0] <> #0 do
  begin
    if Result[0] <> SubStr[0] then
      Inc(Result)
    else
    begin
      P := Result + 1;
      I := 1; //<<<< FIX (was I := 0;)
      while (P[0] <> #0) and (P[0] = SubStr[I]) do
      begin
        Inc(I);
        Inc(P);
      end;
<snip>
TagsNo tags attached.

Activities

AHUser

2004-04-15 00:56

developer   ~0003867

Thanks,

fixed in CVS

Issue History

Date Modified Username Field Change
2004-04-14 17:52 anonymous New Issue
2004-04-15 00:56 AHUser Status new => resolved
2004-04-15 00:56 AHUser Resolution open => fixed
2004-04-15 00:56 AHUser Assigned To => AHUser
2004-04-15 00:56 AHUser Note Added: 0003867