summaryrefslogtreecommitdiff
path: root/src/emulators
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2024-11-13 10:53:52 +1300
committerBen Bridle <ben@derelict.engineering>2024-11-13 10:54:26 +1300
commit5ca376b56c3a495c9772e546995485159da2e664 (patch)
treea044529fe19e9452a5ae4eccf851734adf447173 /src/emulators
parentf40681a72956b36fd5b3dfa596c497935159a372 (diff)
downloadbedrock-pc-5ca376b56c3a495c9772e546995485159da2e664.zip
Fix line drawing issue
An overflow error was causing the line drawing method to loop forever any time a line of length 0x4000 (16384) or longer was drawn. The issue was occurring because both e1 and dx (or dy) would have a value of at least 0x4000, and so on lines 291/292 the sum would exceed 0x8000, the maximum value of an i16. The value would then wrap and break the assumptions of the line drawing algorithm, causing it to loop forever. This was fixed by increasing the size of the affected types.
Diffstat (limited to 'src/emulators')
0 files changed, 0 insertions, 0 deletions