From ce31c0a7629d72a29ae2f5ae091d50b47f294957 Mon Sep 17 00:00:00 2001 From: nicolas-arnaud Date: Tue, 22 Nov 2022 09:53:23 +0100 Subject: [PATCH] fixes --- src/mlx/mlx_1.c | 2 +- src/parsing/getline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlx/mlx_1.c b/src/mlx/mlx_1.c index 71ffb45..f70ded4 100644 --- a/src/mlx/mlx_1.c +++ b/src/mlx/mlx_1.c @@ -35,7 +35,7 @@ int mouse_move_hook(int x, int y, t_env *env) (void)y; dx = WIN_X_SZ / 2 - x; if (dx) - env->playerDir = dvec_rot(env->playerDir, + env->player_dir = dvec_rot(env->player_dir, (double)(-M_PI * dx / 1800.0), 1); mlx_mouse_move(env->mlx, env->win, WIN_X_SZ / 2, WIN_Y_SZ / 2); return (1); diff --git a/src/parsing/getline.c b/src/parsing/getline.c index 209bdd1..0560927 100644 --- a/src/parsing/getline.c +++ b/src/parsing/getline.c @@ -30,7 +30,7 @@ char *save_buffer(char *buffer, int *i) return (part1); } } - part1[4097] = 0; + part1[4096] = 0; part2 = save_buffer(buffer, i); ret = ft_strjoin(part1, part2); free(part1);