Skip to content

Commit

Permalink
Merge pull request #23 from Savapitech/s_fix_des_trucs
Browse files Browse the repository at this point in the history
fix: put hex strcpy
  • Loading branch information
savalet authored Oct 30, 2024
2 parents 4a67c49 + 8427a5b commit 76d8141
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/handler/put_hex.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int baby_put_hex(size_t nb, flags_t *flags)
}
str[i] = '\0';
baby_revstr(str);
flags->spec_buff.str = str;
baby_strcpy(flags->spec_buff.str, str);
flags->spec_buff.count = i;
return 0;
}
Expand All @@ -45,7 +45,7 @@ int baby_put_hex_upc(size_t nb, flags_t *flags)
}
str[i] = '\0';
baby_revstr(str);
flags->spec_buff.str = str;
baby_strcpy(flags->spec_buff.str, str);
flags->spec_buff.count = i;
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions src/handler/put_nbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
** display the number given as parameter
*/

#include <stdio.h>

#include "my.h"

void printf_put_nbr(flags_t *flags)
Expand Down
2 changes: 1 addition & 1 deletion src/handler/put_oct.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int baby_put_oct(int nb, flags_t *flags)
}
str[i] = '\0';
baby_revstr(str);
flags->spec_buff.str = str;
baby_strcpy(flags->spec_buff.str, str);
flags->spec_buff.count = i;
return 0;
}
Expand Down

0 comments on commit 76d8141

Please sign in to comment.