View Issue Details

IDProjectCategoryView StatusLast Update
0005573JEDI VCL00 JVCL Componentspublic2011-09-21 14:10
ReporterPVisserAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.45 
Summary0005573: StringToHTML   causes #0 (<NUL>) in string
DescriptionNew code (was not there in 3.30) that allows multiple spaces to be turned into   causes #0 in the string.
Probably optimization problem: instead of using "Length(nbsp)-1" the length has been hardcoded (6). This is fine, except the other code uses "len-1", so it should be 5 in this particular case.

Snap of (fixed) JvStrToHTML below:


  for I := 1 to Len do
  begin
    Ch := Value[I];
    if Ch = ' ' then
    begin
      if (I > 1) and (Value[I - 1] = ' ') then

// Offending line had addlen 6 (length(nbsp))
        Inc(AddLen, 5 {Length(Nbsp)-1});


    end
    else
      for J := Low(Conversions) to High(Conversions) do
        if Ch = Conversions[J].Ch then
        begin
          Inc(AddLen, StrLen(Conversions[J].Html) - 1);
          Break;
        end;
  end;

TagsNo tags attached.

Activities

AHUser

2011-05-06 21:36

developer   ~0018539

Fixed in svn revision 13022.

Issue History

Date Modified Username Field Change
2011-05-06 10:14 PVisser New Issue
2011-05-06 21:36 AHUser Note Added: 0018539
2011-05-06 21:36 AHUser Status new => resolved
2011-05-06 21:36 AHUser Fixed in Version => Daily / SVN
2011-05-06 21:36 AHUser Resolution open => fixed
2011-05-06 21:36 AHUser Assigned To => AHUser
2011-09-21 14:10 obones Fixed in Version Daily / SVN => 3.45