fix: learning to code (with maiboyer standard lib)

This commit is contained in:
Raphael 2024-09-27 22:41:26 +02:00
parent e163682e2e
commit f66e5d76f7

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */ /* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */ /* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */
/* Updated: 2024/09/27 22:35:20 by rparodi ### ########.fr */ /* Updated: 2024/09/27 22:40:57 by rparodi ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -29,13 +29,13 @@ t_error find_end_string(t_str raw, t_usize *start, t_token *output)
return (ERROR); return (ERROR);
if (is_quote(raw[(*start)])) if (is_quote(raw[(*start)]))
{ {
string_push_char(output->string, raw[(*start)]); string_push_char(&output->string, raw[(*start)]);
(*start)++; (*start)++;
if (raw[(*start)] == '\0') if (raw[(*start)] == '\0')
return (ERROR); return (ERROR);
while (raw[(*start)] != '\0') while (raw[(*start)] != '\0')
{ {
string_push_char(output->string.buf, raw[(*start)]); string_push_char(&output->string, raw[(*start)]);
if (is_quote(raw[(*start)])) if (is_quote(raw[(*start)]))
return (NO_ERROR); return (NO_ERROR);
(*start)++; (*start)++;