diff --git a/src/core.c b/src/core.c index acb41b0c..32aa33a0 100644 --- a/src/core.c +++ b/src/core.c @@ -1327,7 +1327,7 @@ int extract_variable_text_internal(struct text_object *retval, const char *const strfold(p, 1); } else if (*p == '#') { char c; - if (remove_comment(p, &c) && p > orig_p && c == '\n') { + if (remove_comment(p, &c) && p >= orig_p && c == '\n') { /* if remove_comment removed a newline, we need to 'back up' with p */ p--; }