123
This commit is contained in:
parent
540900864d
commit
1ab12f2170
@ -42,7 +42,6 @@ Node *parse_node(char **lines, int n, int *idx, int *err) {
|
|||||||
(*idx)++;
|
(*idx)++;
|
||||||
if (line[0] == '*') {
|
if (line[0] == '*') {
|
||||||
char *txt = line + 1;
|
char *txt = line + 1;
|
||||||
txt = ltrim(txt);
|
|
||||||
Node *node = malloc(sizeof(Node));
|
Node *node = malloc(sizeof(Node));
|
||||||
if (!node) { *err = 1; return NULL; }
|
if (!node) { *err = 1; return NULL; }
|
||||||
node->is_answer = 1;
|
node->is_answer = 1;
|
||||||
@ -122,7 +121,7 @@ int main(void) {
|
|||||||
int valid_input = 0;
|
int valid_input = 0;
|
||||||
while (cur) {
|
while (cur) {
|
||||||
if (cur->is_answer) {
|
if (cur->is_answer) {
|
||||||
printf("* %s\n", cur->text);
|
printf("*%s\n", cur->text);
|
||||||
valid_input = 1;
|
valid_input = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user