Back in 2018, #119 replaced -1 :: LONG with maxBound :: LONG in the implementation of getMessage and peekMessage. This is not correct since -1 :: LONG is FFFF FFFF, whereas maxBound :: LONG is only 7FFF FFFF. Consequently, error cases are not correctly identified. (LONG = Int32. Note that under the Windows.h definition of getMessage, they return BOOL = int ~= our INT = Int32, but we are saying they return LONG = Int32.)
Steps to Reproduce (for bugs)
Use the same Main.hs file I provided in #142
Test on a version from 2.8.2 on.
Close the window.
Notice the process is stuck in an infinite loop as it perpetually receives an error and never reaches a terminating condition. (On the other hand, I thought the code should have returned FALSE = False and got let out of the loop on another ground.)
Your Environment
Version used: bisecting through 2.6.1 (which I wrote the code on) and 51825ad
Current Behavior
Back in 2018, #119 replaced
-1 :: LONG
withmaxBound :: LONG
in the implementation of getMessage and peekMessage. This is not correct since-1 :: LONG
is FFFF FFFF, whereasmaxBound :: LONG
is only 7FFF FFFF. Consequently, error cases are not correctly identified. (LONG = Int32. Note that under the Windows.h definition of getMessage, they returnBOOL
=int
~= ourINT
=Int32
, but we are saying they returnLONG
=Int32
.)Steps to Reproduce (for bugs)
FALSE
=False
and got let out of the loop on another ground.)Your Environment