From 2024152dc6c71c6840ecc33e899ad8c7976e9b02 Mon Sep 17 00:00:00 2001 From: zawz Date: Mon, 24 Jan 2022 14:46:48 +0100 Subject: [PATCH] fix(include): fix broken include on empty files --- src/parse.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/parse.cpp b/src/parse.cpp index ef6abb0..3b6571f 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -103,11 +103,9 @@ parse_context make_context(std::string const& in, std::string const& filename, b parse_context make_context(parse_context ctx, std::string const& in, std::string const& filename, bool bash) { - if(in != "") - { - ctx.data = in.c_str(); - ctx.size = in.size(); - } + ctx.data = in.c_str(); + ctx.size = in.size(); + if(filename != "") ctx.filename = filename.c_str(); if(bash)