Skip to content

Commit

Permalink
Added explicit casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
fancycode committed Sep 21, 2014
1 parent da78edc commit bb736dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MemoryModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data,
result->headers->OptionalHeader.ImageBase = (POINTER_TYPE)code;

// copy sections from DLL file block to new memory location
CopySections(data, old_header, result);
CopySections((const unsigned char *) data, old_header, result);

// adjust base address of imported data
locationDelta = (SIZE_T)(code - old_header->OptionalHeader.ImageBase);
Expand Down Expand Up @@ -728,7 +728,7 @@ MemoryLoadStringEx(HMEMORYMODULE module, UINT id, LPTSTR buffer, int maxsize, WO
return 0;
}

data = MemoryLoadResource(module, resource);
data = (PIMAGE_RESOURCE_DIR_STRING_U) MemoryLoadResource(module, resource);
id = id & 0x0f;
while (id--) {
data = (PIMAGE_RESOURCE_DIR_STRING_U) (((char *) data) + (data->Length + 1) * sizeof(WCHAR));
Expand Down

0 comments on commit bb736dc

Please sign in to comment.