浏览代码

rtl/osheap: fixed a dumb reversed condition in osheap/SysAllocMem()

Karoly Balogh 4 年之前
父节点
当前提交
c298c0e0da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/inc/osheap.inc

+ 1 - 1
rtl/inc/osheap.inc

@@ -79,7 +79,7 @@
     function SysAllocMem(size: ptruint): pointer;
     function SysAllocMem(size: ptruint): pointer;
       begin
       begin
         result := SysGetMem(size);
         result := SysGetMem(size);
-        if not assigned(result) then
+        if assigned(result) then
           FillChar(result^,SysMemSize(result),0);
           FillChar(result^,SysMemSize(result),0);
       end;
       end;