Commit 5cfbcb91 authored by Gabriel Genois's avatar Gabriel Genois

...

parent 05a98c17
Pipeline #97 passed with stages
in 58 seconds
......@@ -19,7 +19,6 @@ char *ft_strupper(char *str)
char *new;
new = ft_strdup(str);
free(str);
i = -1;
while (new[++i] != '\0')
new[i] = ft_toupper(new[i]);
......
......@@ -91,6 +91,7 @@ char *ftpf_get_n(t_pfdata **dt, va_list *data)
base = 10;
l = ftpf_getlength(dt);
src = NULL;
if (ftpf_istypenum((*dt)->t))
{
if ((*dt)->t == 'o' || (*dt)->t == 'O')
......@@ -107,7 +108,8 @@ char *ftpf_get_n(t_pfdata **dt, va_list *data)
out = ft_strupper(src);
else
out = ft_strdup(src);
free(src);
if(src != NULL)
free(src);
return (out);
}
return (NULL);
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment