summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁkos Kőrösi <korakos99@gmail.com>2026-05-22 10:17:50 +0200
committerÁkos Kőrösi <korakos99@gmail.com>2026-05-22 10:17:50 +0200
commit52f8b31f8a06a39b223780d2df304b06d0d43daa (patch)
treeefb13ef050efcb8a913cf54b338efffad4e0d389
parent317656b7feb906b4234956ede6dd75495a49ab7f (diff)
fix some quoting bugs
-rw-r--r--docs/DEVNOTES.md3
-rw-r--r--src/lexparse.c2
-rw-r--r--src/preproc.c1
3 files changed, 2 insertions, 4 deletions
diff --git a/docs/DEVNOTES.md b/docs/DEVNOTES.md
index a1e0c08..8093efc 100644
--- a/docs/DEVNOTES.md
+++ b/docs/DEVNOTES.md
@@ -13,6 +13,3 @@
- marked todos in code
## BUGS
-
-2.
-```echo "'hi'"``` hangs
diff --git a/src/lexparse.c b/src/lexparse.c
index a4105eb..eae5c16 100644
--- a/src/lexparse.c
+++ b/src/lexparse.c
@@ -115,7 +115,7 @@ static void collect_double_q_section(char* line, Word* result_buf, size_t* pos)
push_to_String(&lit_buf, '$');
}
} else {
- push_to_String(&lit_buf, line[*pos]);
+ push_to_String(&lit_buf, line[(*pos)++]);
}
}
if (line[(*pos)++] == '\0') exit(46);
diff --git a/src/preproc.c b/src/preproc.c
index 5669ce4..8865968 100644
--- a/src/preproc.c
+++ b/src/preproc.c
@@ -69,6 +69,7 @@ StrVec process_word(Word word, ShellState* shstate) {
Chunk chunk = *get_from_Word(&word, i);
process_chunk(chunk, &split_bui, shstate);
}
+ consolidate_split_builder(&split_bui);
return split_bui.completed_fields;
}