citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit fe93c5909587736741467c0cdca068a6b6a08abf
parent dce338afba40efaceb330bbc0ad868f7e2861554
Author: Kyle Milz <kyle@0x30.net>
Date:   Thu, 15 Dec 2016 19:57:00 -0700

src: add check for file size match

Diffstat:
Msrc/process_file.cc | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/process_file.cc b/src/process_file.cc @@ -89,6 +89,10 @@ TranslationUnit::read_source() std::string line; while (std::getline(file_stream, line)) m_source.push_back(line); + + if (m_source.size() != m_node->size) + warnx("%s size mismatch: %lu vs %u", m_node->abs_file_path, + m_source.size(), m_node->size); } //