aboutsummaryrefslogtreecommitdiff
path: root/c11/ex05/main.c
diff options
context:
space:
mode:
authorCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-19 07:04:04 +0200
committerCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-19 07:04:04 +0200
commit9eef9647b83f32f4bd8086de420cf1caeabf0206 (patch)
tree654ba9e8216c688bb3d6a2e5d67526ae8ec4b874 /c11/ex05/main.c
parentcffe7f69cf28ab0889bee54a18c3f39101b33f16 (diff)
downloadpiscine-9eef9647b83f32f4bd8086de420cf1caeabf0206.tar.gz
piscine-9eef9647b83f32f4bd8086de420cf1caeabf0206.tar.bz2
piscine-9eef9647b83f32f4bd8086de420cf1caeabf0206.zip
c10 done?, c11 moulinetted (ex04, ex06 need correction)
Diffstat (limited to 'c11/ex05/main.c')
-rw-r--r--c11/ex05/main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/c11/ex05/main.c b/c11/ex05/main.c
index e234053..c29b6ef 100644
--- a/c11/ex05/main.c
+++ b/c11/ex05/main.c
@@ -6,7 +6,7 @@
/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/17 07:29:52 by cacharle #+# #+# */
-/* Updated: 2019/07/17 16:37:31 by cacharle ### ########.fr */
+/* Updated: 2019/07/18 10:38:57 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -34,13 +34,8 @@ int main(int argc, char **argv)
{
x = ft_atoi(argv[1]);
y = ft_atoi(argv[3]);
- if (operator_index == 3 && y == 0)
- {
-
- }
- if (operator_index == 3 && y == 0)
- {
- }
+ if (check_floating_point_error(operator_index, y) == -1)
+ return (0);
ft_putnbr((*operators[operator_index])(x, y));
}
ft_putchar('\n');