Browse Source

* Fix for bug ID #29663

git-svn-id: trunk@33237 -
michael 9 years ago
parent
commit
3ce6312068
1 changed files with 5 additions and 3 deletions
  1. 5 3
      packages/fcl-registry/src/xmlreg.pp

+ 5 - 3
packages/fcl-registry/src/xmlreg.pp

@@ -605,15 +605,17 @@ Var
   N  : TDomElement;
   N  : TDomElement;
   DN : TDomNode;
   DN : TDomNode;
   L : Integer;
   L : Integer;
+  S: Ansistring; 
 begin
 begin
   N:=FindValueKey(Name);
   N:=FindValueKey(Name);
   Result:=(N<>Nil);
   Result:=(N<>Nil);
   If Result then
   If Result then
     begin
     begin
     DN:=N.FirstChild;
     DN:=N.FirstChild;
-    if Assigned(DN) and (DN.NodeType=TEXT_NODE) then
-      L:=TDOMText(DN).Length
-    else
+    if Assigned(DN) and (DN.NodeType=TEXT_NODE) then begin
+      S := DN.NodeValue;
+      L:=Length(S);
+    end else
       L:=0;
       L:=0;
     With Info do
     With Info do
       begin
       begin