1st go at a patch

All development related issues welcome

Moderator: Moderator Team

Post Reply
cagey45
Posts: 2
Joined: Thu May 25, 2017 1:07 pm

1st go at a patch

Post by cagey45 »

long time lurker, first time patcher.

core-1151 has a comment added on 2016-02-21 by Radek that page files on drives other than C weren't created. Seemed a good place to start learning the code.

This is caused by a hard coded index of 0 in wParam to retrieve the value for DriveIndex so it always gets the C drive.

I'm not really sure about putting it in jira as its not really related to what that issue is about, although this patch will make it easier to test that issue.

Code: Select all

Index: dll/cpl/sysdm/virtmem.c
===================================================================
--- dll/cpl/sysdm/virtmem.c     (revision 74635)
+++ dll/cpl/sysdm/virtmem.c     (working copy)
@@ -406,7 +406,7 @@
         DriveIndex = SendDlgItemMessage(pVirtMem->hSelf,
                                         IDC_PAGEFILELIST,
                                         LB_GETITEMDATA,
-                                        0,
+                                        Index,
                                         0);

         /* Check if custom settings are checked */
hbelusca
Developer
Posts: 1204
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: 1st go at a patch

Post by hbelusca »

Hi, thanks for the fix! I've committed it in r74657. By the way, no-one would have criticized you for attaching this patch in Jira :) .
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests