Commit 811c4119 authored by Jeff Miller's avatar Jeff Miller Committed by Alexandre Julliard

Mask off bit 0x80 in the accelerator table entry field fVirt if it's

not the last entry.
parent 96b90570
...@@ -228,14 +228,14 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries) ...@@ -228,14 +228,14 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
} }
accel = GlobalLock16(HACCEL_16(hAccel)); accel = GlobalLock16(HACCEL_16(hAccel));
for (i=0;i<cEntries;i++) { for (i=0;i<cEntries;i++) {
accel[i].fVirt = lpaccel[i].fVirt; accel[i].fVirt = lpaccel[i].fVirt & ~0x80;
accel[i].key = lpaccel[i].key; accel[i].key = lpaccel[i].key;
accel[i].cmd = lpaccel[i].cmd; accel[i].cmd = lpaccel[i].cmd;
} }
/* Set the end-of-table terminator. */ /* Set the end-of-table terminator. */
accel[cEntries-1].fVirt |= 0x80; accel[cEntries-1].fVirt |= 0x80;
TRACE_(accel)("Allocated accelerator handle %p\n", hAccel); TRACE_(accel)("Allocated accelerator handle %p with %d entries\n", hAccel,cEntries);
return hAccel; return hAccel;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment