GeezerVison is showing github.com — Added explicit casts. · code4bones/MemoryModule@bb736dc
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: MemoryModule.c +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -420,7 +420,7 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data, |
420 | 420 | result->headers->OptionalHeader.ImageBase = (POINTER_TYPE)code; |
421 | 421 |
|
422 | 422 | // copy sections from DLL file block to new memory location |
423 | | - CopySections(data, old_header, result); |
| 423 | + CopySections((const unsigned char *) data, old_header, result); |
424 | 424 |
|
425 | 425 | // adjust base address of imported data |
426 | 426 | locationDelta = (SIZE_T)(code - old_header->OptionalHeader.ImageBase); |
@@ -728,7 +728,7 @@ MemoryLoadStringEx(HMEMORYMODULE module, UINT id, LPTSTR buffer, int maxsize, WO |
728 | 728 | return 0; |
729 | 729 | } |
730 | 730 |
|
731 | | - data = MemoryLoadResource(module, resource); |
| 731 | + data = (PIMAGE_RESOURCE_DIR_STRING_U) MemoryLoadResource(module, resource); |
732 | 732 | id = id & 0x0f; |
733 | 733 | while (id--) { |
734 | 734 | data = (PIMAGE_RESOURCE_DIR_STRING_U) (((char *) data) + (data->Length + 1) * sizeof(WCHAR)); |
|