Handle negative numbers in rush00.c

This commit is contained in:
Timo Schmidt 2023-03-19 19:08:45 +01:00
parent 4053efeaef
commit 22ca98299b
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
/* By: jtorrez- <marvin@42.fr> +#+ +:+ +#+ */ /* By: jtorrez- <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/18 20:15:12 by jtorrez- #+# #+# */ /* Created: 2023/03/18 20:15:12 by jtorrez- #+# #+# */
/* Updated: 2023/03/19 04:21:23 by tischmid ### ########.fr */ /* Updated: 2023/03/19 18:56:58 by tischmid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -31,7 +31,7 @@ void rush(int x, int y)
int i; int i;
i = 0; i = 0;
if (x * y == 0) if (x < 1 && y < 1)
return ; return ;
horiz_line(g_corners[0], g_horizontal, g_corners[1], x); horiz_line(g_corners[0], g_horizontal, g_corners[1], x);
while (i++ < y - 2) while (i++ < y - 2)