fix: fixed crash when reading variables with underscore
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/10/22 18:37:38 by sede-san #+# #+# */
|
||||
/* Updated: 2026/02/12 21:25:39 by sede-san ### ########.fr */
|
||||
/* Updated: 2026/02/13 08:17:43 by sede-san ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -119,7 +119,7 @@ static void expand_variable(
|
||||
int end;
|
||||
|
||||
end = start;
|
||||
while (ft_isalnum((*argument)[end]))
|
||||
while (ft_isalnum((*argument)[end]) || (*argument)[end] == '_')
|
||||
end++;
|
||||
variable_name = ft_substr(*argument, start, end - start);
|
||||
if (variable_name == NULL)
|
||||
|
||||
Reference in New Issue
Block a user