Merge branch 'master' of git.chauvet.pro:starnakin/minishell

This commit is contained in:
Camille Chauvet 2023-02-28 14:52:16 +01:00
commit af7336fbf3

View File

@ -6,7 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */ /* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */ /* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */
/* Updated: 2023/02/28 14:40:05 by erey-bet ### ########.fr */ /* Updated: 2023/02/28 14:50:24 by erey-bet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -37,11 +37,11 @@ int ft_exit(char **args, int fd)
return (error(-1, "too many arguments", NULL, fd)); return (error(-1, "too many arguments", NULL, fd));
if (err > 0) if (err > 0)
return(error(err, "numeric argument required", args[0], fd)); return(error(err, "numeric argument required", args[0], fd));
return (ft_atoi(args[0]) % 256); return ((ft_atoi(args[0]) % 256 + 256) % 256);
} }
int main(int argc, char *argv[]) /*int main(int argc, char *argv[])
{ {
(void)argc; (void)argc;
return(ft_exit(argv + 1, 1)); return(ft_exit(argv + 1, 1));
} }*/