Skip to content

Commit

Permalink
Fix Y parameter overflow in command generation
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1187 committed May 9, 2021
1 parent f7a6c04 commit f9a2d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions triangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ int main(void){
// Create RDP triangle command
while(!(disp = display_lock()));

triangle_commands[0] = 0x08000000 | (major << 23) | yl;
triangle_commands[1] = (ym << 16) | yh;
triangle_commands[0] = 0x08000000 | (major << 23) | (yl & 0xffff);
triangle_commands[1] = ((ym & 0xffff) << 16) | (yh & 0xffff);
triangle_commands[2] = xl;
triangle_commands[3] = dxldy;
triangle_commands[4] = xh;
Expand Down

0 comments on commit f9a2d7b

Please sign in to comment.