Rev 206 | Rev 237 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 206 | Rev 211 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | if( (h = LoadResource(hm,resinfo)) && (pparm = (Ptr)LockResource(h)) ){ |
52 | if( (h = LoadResource(hm,resinfo)) && (pparm = (Ptr)LockResource(h)) ){ |
53 | // Fix by DM, 18 Dec 2018: |
53 | // Fix by DM, 18 Dec 2018: |
54 | // We need to copy the information, because the resource data is read-only |
54 | // We need to copy the information, because the resource data is read-only |
55 | DWORD resSize = SizeofResource(hm,resinfo); |
55 | DWORD resSize = SizeofResource(hm,resinfo); |
56 | char* copy = (char*)malloc(resSize); |
56 | char* copy = (char*)malloc(resSize); |
- | 57 | if (!copy) return false; |
|
57 | memcpy(copy, pparm, resSize); |
58 | memcpy(copy, pparm, resSize); |
58 | obfusc((unsigned char*)copy, resSize); |
59 | deobfusc((unsigned char*)copy, resSize); |
59 | res = readPARM(copy,&gdata->parm,reason,1); |
60 | res = readPARM(copy,&gdata->parm,reason,1); |
60 | free(copy); |
61 | free(copy); |
61 | } |
62 | } |
62 | } |
63 | } |
63 | return res; |
64 | return res; |