Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed invalid RT_GROUP_ICON when adding icons directly from the Write…
…r class

Resource type RT_GROUP_ICON weren't written properly when calling the AddWin32Icon methods on the Writer class, the ID of each GRPICONDIRENTRY were written as an INT instead of a USHORT.
  • Loading branch information
vocero authored Jan 10, 2020
commit dd648b3d67bf81b12293b67943030824758b54d7
4 changes: 2 additions & 2 deletions System.Compiler/Writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5470,8 +5470,8 @@ internal unsafe static void AddWin32Icon(Module/*!*/ module, Stream win32IconStr
indexHeap.Write(cursor.ReadUInt16()); //bit count
int len = cursor.ReadInt32();
int offset = cursor.ReadInt32();
indexHeap.Write((int)len);
indexHeap.Write((int)module.Win32Resources.Count+2);
indexHeap.Write((uint)len);
indexHeap.Write((ushort)(module.Win32Resources.Count+2));
MemoryCursor c = new MemoryCursor(cursor);
c.Position = offset;
resource.Data = c.ReadBytes(len);
Expand Down