diff options
Diffstat (limited to '')
-rw-r--r-- | src/m_prompt.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/m_prompt.c b/src/m_prompt.c index 0fbd9f2..68126ff 100644 --- a/src/m_prompt.c +++ b/src/m_prompt.c @@ -59,10 +59,10 @@ static void m_update_psx(unsigned char x, t_msh *msh) ft_strlcpy(msh->ps[x - 1], var, 255); } -unsigned int m_plen(char *prompt) +size_t m_plen(char *prompt) { - unsigned int i; - unsigned int size; + size_t i; + size_t size; i = 0; size = 0; @@ -72,15 +72,13 @@ unsigned int m_plen(char *prompt) { while (prompt[i] != 'm' && prompt[i] != '\0') i++; + i++; } - if (ft_isalnum(prompt[i]) || - ft_ischarset("<>", prompt[i])) + else { size++; i++; } - else - i++; } return (size); } |