[ros-kernel] accelerator.c, loop bug?
James Marjie
jidatlah at sandyvalley.net
Sun Feb 1 21:29:30 CET 2004
Mark IJbema wrote:
>Hi, i noticed something strange about accelerator.c. It contains a for
>loop, however it has an increment at the end of the loop, which would
>make me think that this was a while loop, not properly converted to
>while. If not, shouldn't it just be i+=2 in the loop increment?
>
>the code (last part of accelerator.c):
>
> for (i = 0; i < AcceleratorTable->Count; i++)
> {
> if (IntTranslateAccelerator(Window, Message->message, Message->wParam, Message->lParam,
> AcceleratorTable->Table[i].fVirt, AcceleratorTable->Table[i].key,
> AcceleratorTable->Table[i].cmd))
> {
> ObDereferenceObject(WindowStation);
> DPRINT1("NtUserTranslateAccelerator(Window %x, Table %x, Message %p) = %i end\n",
> Window, Table, Message, 1);
> return 1;
> }
> if (((AcceleratorTable->Table[i].fVirt & 0x80) > 0))
> {
> break;
> }
> i++;
> }
>
>Mark
>_______________________________________________
>Ros-kernel mailing list
>Ros-kernel at reactos.com
>http://reactos.com/mailman/listinfo/ros-kernel
>
>
>
>
Nope, it might not even get to that last i++, if it breaks or returns.
Now if this is a bug or not is up to so someone else. 8^)
James Marjie
More information about the Ros-kernel
mailing list