Browse Source

* Fixed bug in length calculation, causing any namespaced attributes with local part differing only in the last character (or consisting of a single character), to be erroneously reported as duplicate.

git-svn-id: trunk@13960 -
sergei 16 years ago
parent
commit
158afbb5b4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-xml/src/xmlread.pp

+ 1 - 1
packages/fcl-xml/src/xmlread.pp

@@ -3227,7 +3227,7 @@ begin
       { detect duplicates }
       { detect duplicates }
       J := FWorkAtts[I].PrefixLen+1;
       J := FWorkAtts[I].PrefixLen+1;
 
 
-      if FNsAttHash.Locate(@b.uri, @AttrName^.Key[J], Length(AttrName^.Key) - J) then
+      if FNsAttHash.Locate(@b.uri, @AttrName^.Key[J], Length(AttrName^.Key) - J+1) then
         FatalError('Duplicate prefixed attribute');
         FatalError('Duplicate prefixed attribute');
 
 
       // convert Attr into namespaced one (by hack for the time being)
       // convert Attr into namespaced one (by hack for the time being)