diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-22 22:04:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 22:04:25 +0100 |
commit | 4f4a053dff51fe28e473ac8b3528a95dc6e5dec6 (patch) | |
tree | b22e63b6e247179df4069df8a0f902ed40a3471e /src/openvic-dataloader/v2script | |
parent | 59ec8275b584d4a48f7836816114d4933c655799 (diff) | |
parent | afbd8024110aaa80a7b94cff9a9d96e763b13916 (diff) |
Merge pull request #36 from OpenVicProject/fix/file-path-memory
Fixed BasicParser::_file_path relying on externally controlled memory
Diffstat (limited to 'src/openvic-dataloader/v2script')
-rw-r--r-- | src/openvic-dataloader/v2script/Parser.cpp | 4 |
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(); |