Browse Source

* fixed reference count bug in the unicode version of TView.do_writeViewRec1

git-svn-id: branches/unicodekvm@48736 -
nickysn 4 years ago
parent
commit
f04d87bc3d
1 changed files with 10 additions and 2 deletions
  1. 10 2
      packages/fv/src/views.inc

+ 10 - 2
packages/fv/src/views.inc

@@ -4328,11 +4328,19 @@ begin
           SrcPos:=x1 - staticVar2.offset;
           SrcPos:=x1 - staticVar2.offset;
           l:=x2-x1;
           l:=x2-x1;
           if (shadowCounter=0) then
           if (shadowCounter=0) then
+           begin
 {$ifdef FV_UNICODE}
 {$ifdef FV_UNICODE}
-           move(staticVar1^[SrcPos],PVideoBuf(G^.buffer)^[BufPos],l*SizeOf(TEnhancedVideoCell))
+             while (l>0) do
+              begin
+                PVideoBuf(G^.buffer)^[BufPos]:=staticVar1^[SrcPos];
+                inc(BufPos);
+                inc(SrcPos);
+                dec(l);
+              end;
 {$else FV_UNICODE}
 {$else FV_UNICODE}
-           move(staticVar1^[SrcPos],PVideoBuf(G^.buffer)^[BufPos],l shl 1)
+             move(staticVar1^[SrcPos],PVideoBuf(G^.buffer)^[BufPos],l shl 1)
 {$endif FV_UNICODE}
 {$endif FV_UNICODE}
+           end
           else
           else
            begin { paint with shadowAttr }
            begin { paint with shadowAttr }
              while (l>0) do
              while (l>0) do