TurboPack / Orpheus

Orpheus is an award-winning UI toolkit for Embarcadero Delphi & C++Builder
Other
99 stars 36 forks source link

64-bit issue in ovcfxfnt #33

Closed Lasibian closed 2 years ago

Lasibian commented 2 years ago

There is a 64-bit issue in ovcfxfnt.pas:

RefreshFixedFontNames casts a TStringlist into an Integer. This needs to be changed to a NativeInt to avoid an access violation in 64-bit.

procedure RefreshFixedFontNames;
  var
    DC : HDC;
  begin
    FixedFontNames.Clear;
    DC := GetDC(0);
    try
      EnumFontFamilies(DC, nil, @EnumFixedFontsProc, integer(FixedFontNames)); // <-- must be NativeInt
    finally
      ReleaseDC(0, DC);
    end;
  end;
romankassebaum commented 2 years ago

Fixed.