aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-22 17:32:18 +0100
committer hop311 <hop3114@gmail.com>2024-01-22 17:32:18 +0100
commitfe1938484ab359fb76712cb59a43830e6f852f00 (patch)
tree9ac450512b18730461c4eaeb3af29b03da6f9b71 /src/openvic-dataloader/v2script
parent77167fe3366b40b74abff45bcb62f7480963d617 (diff)
Fixed BasicParser::_file_path relying on externally controlled memoryfix/file-path-memory
Diffstat (limited to 'src/openvic-dataloader/v2script')
-rw-r--r--src/openvic-dataloader/v2script/Parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic-dataloader/v2script/Parser.cpp b/src/openvic-dataloader/v2script/Parser.cpp
index c46d326..3141550 100644
--- a/src/openvic-dataloader/v2script/Parser.cpp
+++ b/src/openvic-dataloader/v2script/Parser.cpp
@@ -273,7 +273,7 @@ const ast::Node::line_col Parser::get_node_end(const ast::NodeCPtr node) const {
const ast::Node::line_col ast::Node::get_begin_line_col(const Parser& parser) const {
if (!parser._buffer_handler->is_valid() || parser._buffer_handler->_location_map.empty()) return {};
- line_col result;
+ line_col result {};
auto [itr, range_end] = parser._buffer_handler->_location_map.equal_range(this);
if (itr != range_end) {
result.line = itr->second.line_nr();
@@ -293,7 +293,7 @@ const ast::Node::line_col ast::Node::get_begin_line_col(const Parser& parser) co
const ast::Node::line_col ast::Node::get_end_line_col(const Parser& parser) const {
if (!parser._buffer_handler->is_valid() || parser._buffer_handler->_location_map.empty()) return {};
- line_col result;
+ line_col result {};
auto [itr, range_end] = parser._buffer_handler->_location_map.equal_range(this);
if (itr != range_end) {
result.line = itr->second.line_nr();