summaryrefslogtreecommitdiffstats
path: root/src/ft_p_lcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_p_lcom.c')
-rw-r--r--src/ft_p_lcom.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ft_p_lcom.c b/src/ft_p_lcom.c
index f965555..6711b85 100644
--- a/src/ft_p_lcom.c
+++ b/src/ft_p_lcom.c
@@ -17,21 +17,25 @@
int8_t
ft_p_lcom(const char line[],
- const int64_t count,
+ const uint64_t count,
t_msh *msh)
{
- int64_t i;
+ uint64_t i;
char **words;
i = 0;
if (!(words = ft_split(line, ';')))
return (-1);
- while (i < count)
+ while (i <= count)
{
if (!(msh->lcom = ft_lcom_new(words[i])))
{
return (-1);
}
+ if (i < 1)
+ {
+ msh->lcom_head = msh->lcom;
+ }
msh->lcom = msh->lcom->next;
i++;
}