Skip to content

Commit 7e72f98

Browse files
committed
assembler:missingquoterror disasm:nameplayerx2error
1 parent 37e0ac6 commit 7e72f98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

assembler/src/analysis/lexer.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: ciglesia <ciglesia@student.42.fr> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2020/09/08 23:55:20 by ciglesia #+# #+# */
9-
/* Updated: 2020/10/02 13:24:33 by ciglesia ### ########.fr */
9+
/* Updated: 2020/10/02 14:11:18 by ciglesia ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -43,7 +43,7 @@ int is_head(char **cmd, char *str, int line, unsigned int i)
4343
if (i != ft_strlen(str))
4444
return (0);
4545
if (!ft_itersplit(cmd, i) || *ft_itersplit(cmd, i) != '"')
46-
return (-1 + lexicon_error(cmd, 0, "invalid number of quotes", line));
46+
return (-1 + lexicon_error(cmd, i - 1, "expected quote", line));
4747
i++;
4848
quotes = 1;
4949
while (ft_itersplit(cmd, i))

disassembler/src/synthesis/write_source.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: ciglesia <ciglesia@student.42.fr> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2020/09/27 17:18:06 by ciglesia #+# #+# */
9-
/* Updated: 2020/09/27 17:49:08 by ciglesia ### ########.fr */
9+
/* Updated: 2020/10/02 14:14:28 by ciglesia ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -15,7 +15,7 @@
1515
void write_header(t_file *file)
1616
{
1717
ft_printf_fd(file->fd, ".name \"%s\"\n", file->playername);
18-
ft_printf_fd(file->fd, ".comment \"%s\"\n", file->playername);
18+
ft_printf_fd(file->fd, ".comment \"%s\"\n", file->comment);
1919
}
2020

2121
int init_writing(t_file *file)

0 commit comments

Comments
 (0)