From 4b5a50d7fe0609fdd8bc3465ecee93f3db41efc9 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Fri, 17 Feb 2023 18:51:27 +0100 Subject: [PATCH] fix: outfile is now perfectly removed --- .outfile.c.swp | Bin 0 -> 12288 bytes infile.c | 4 ++-- outfile.c | 10 ++++++---- t | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .outfile.c.swp create mode 100644 t diff --git a/.outfile.c.swp b/.outfile.c.swp new file mode 100644 index 0000000000000000000000000000000000000000..9ab161ddae7f2c1e6a765122e5a48da5b3355c47 GIT binary patch literal 12288 zcmeI2Ux*t;9LJ|Et#0+S>We7IG(nR~?vmZKrN^Ey8 zo&jUv${mC}3+@9~#|SwMa^TC`30Va%0}srBV}ODOz+GSm*bc7WhIzm>@D_LjTmUPe z2^cs84uT@cgKu{d@-es!E`is<3*a0$3+BL4@Hm(TB`^tgg5L~6egRj(hu{Nn30wrP zf>%HbRKZa&34Xp6n#9zPSZ!1D}F7!3FRdSOsSQ z12u3MJOO^)f%(7>;Ct{D_#9jY?|_ToZSWFU0vtr(DR2TD0ka?n?ghUie?Nk+!6)E- zAagpHaQ#_3pdI+%95_Raknv6!(7f9ipC*ROtAF>qVdF#AY%Q^B@-9{0_W~x=)5#_) z;-lw^Y3YFj6rV9SniK(?Vtk}0(@|9~sxCRc*N7()g624Ze!w9*O;(6(rQ`E>lPshK z85PdMo(E=Pfg3UwR=HEFc6{zN9nSLB1jT33kMV|AEQ;lbrqM;zU0M{8M?CadkjKE2 z-hx~(y5pg8v0b`bhGrNmc#`=MQzG%h(W2*axd`ZWC+MU_3$SQV_|KE!8*5=4KP%&M zS|KmojUzc}E(lL@GdZ}7uH{9%;HEl7NKeks&Z0}K#KgM1!MUgq}HVYa~&1WJhGWu#f zc^F$A=RsN}vP)%!%k5IA5#p8G zJFW^$h@@M{xJnTMTCYgtvib@|6^M-7LT>siCEnZOB>8VkMHGYF?y6{pR7(HRQf~zj zr)w39taq&8FKb0@5P5cpRj>QRTDCkGVHb4}PmNKxh26Bw8no7>PJkj8g@Ij_mJSSG zNq5&^>XNgme~+(~z8g2UIxphGBH6J0iA`7duje({^+@0ir@`R9Pkz1hj{hMk&3ZxI z?=%?gomZvB4C#ICdo`DzF2^^~Mal(Q*tCll%0h4xFC{qNZr~SF!=@FpvZriT%GQ2r zP1*ZQ+pLJvQLi_rQ)jbTwDD73crQBXQG$<#Y(Q|I5Hu~@+&@&1W{W~m-4Z$a&z4+- zSn>}-Xr*#J!Gm49x2%WN0w0Mu5*+Zpx4z?NrAX0MN`0DY$$fK-))Zb t@zLbOD7$FKgOf&lQ-Y)G^o_J_C5e`}(6=GMKJBy_3vSv*!KN#dKLAS*2q6Ff literal 0 HcmV?d00001 diff --git a/infile.c b/infile.c index 74af6c7..af37ead 100644 --- a/infile.c +++ b/infile.c @@ -6,7 +6,7 @@ /* By: cchauvet ') { - ft_strshift(line + y, -1 * (ft_strlen(tab[i]) + 1)); - i++; - ft_strshift(line + y, -1 * (ft_strlen(tab[i]) + 1)); + ft_strshift(line + y, -1 * (ft_strlen(tab[i]) + ft_strlen(tab[i + 1]) + 2)); } else + { + if (y != 0) + y++; y = y + ft_strlen(tab[i]); + } i++; } ft_freer_tab_ultimate(1, tab); diff --git a/t b/t new file mode 100644 index 0000000..9b47f86 --- /dev/null +++ b/t @@ -0,0 +1 @@ +bozo