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

not the last entry.
This commit is contained in:
Jeff Miller 2003-11-26 22:28:16 +00:00 committed by Alexandre Julliard
parent 96b9057097
commit 811c4119b9

View file

@ -228,14 +228,14 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
}
accel = GlobalLock16(HACCEL_16(hAccel));
for (i=0;i<cEntries;i++) {
accel[i].fVirt = lpaccel[i].fVirt;
accel[i].key = lpaccel[i].key;
accel[i].cmd = lpaccel[i].cmd;
accel[i].fVirt = lpaccel[i].fVirt & ~0x80;
accel[i].key = lpaccel[i].key;
accel[i].cmd = lpaccel[i].cmd;
}
/* Set the end-of-table terminator. */
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;
}