summaryrefslogtreecommitdiff
path: root/src/lexparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexparse.c')
-rw-r--r--src/lexparse.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lexparse.c b/src/lexparse.c
index e2315fe..3d48cfe 100644
--- a/src/lexparse.c
+++ b/src/lexparse.c
@@ -41,8 +41,8 @@ MaybeToken consolidate_buffer(LexingBuffer* buf) {
static Chunk collect_un_q_literal(char* line, size_t* pos) {
String buf = make_String(256);
size_t i;
- for (i = *pos; line[*pos] != '$' && line[*pos] != '\0' && line[*pos] == ' '; i++) {
- push_to_String(&buf, line[*pos]);
+ for (i = *pos; line[i] != '$' && line[i] != '\0' && line[i] == ' '; i++) {
+ push_to_String(&buf, line[i]);
}
*pos = i;
return (Chunk){
@@ -57,8 +57,8 @@ static Chunk collect_single_q_section(char* line, size_t* pos) {
(*pos)++;
String buf = make_String(256);
size_t i;
- for (i = *pos; line[*pos] != '\'' && line[*pos] != '\0'; i++) {
- push_to_String(&buf, line[*pos]);
+ for (i = *pos; line[i] != '\'' && line[i] != '\0'; i++) {
+ push_to_String(&buf, line[i]);
}
if (line[i] == '\0') exit(44);
@@ -75,8 +75,8 @@ static Chunk collect_double_q_section(char* line, size_t* pos) {
(*pos)++;
String buf = make_String(256);
size_t i;
- for (i = *pos; line[*pos] != '\'' && line[*pos] != '\0'; i++) {
- push_to_String(&buf, line[*pos]);
+ for (i = *pos; line[i] != '\'' && line[i] != '\0'; i++) {
+ push_to_String(&buf, line[i]);
}
if (line[i] == '\0') exit(44);