Skip to content

Commit ef3c568

Browse files
committed
Fix two consecutive matches
1 parent 22cada1 commit ef3c568

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shared-module/dotenv/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ STATIC mp_int_t read_value(FIL *active_file, char *value, size_t value_len) {
162162
}
163163
// Unquoted values are ended by a newline or comment.
164164
if (!quoted && (character == '\n' || character == '#')) {
165+
if (character == '\n') {
166+
// Rewind one so the next_line can find the \n.
167+
f_lseek(active_file, f_tell(active_file) - 1);
168+
}
165169
break;
166170
}
167171
if (!quoted && unichar_isspace(character)) {

0 commit comments

Comments
 (0)