We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7272b5 commit dd3167aCopy full SHA for dd3167a
src/core/hexeditor.cpp
@@ -98,10 +98,13 @@ bool HexEditor::loadFile(string path) {
98
this->current_data.clear();
99
this->current_data.shrink_to_fit();
100
101
+ ifs.seekg(0, std::ios::end);
102
+ this->fileSize = ifs.tellg();
103
+ ifs.seekg(0, std::ios::beg);
104
+
105
// copies all data into buffer
106
this->current_data.insert(this->current_data.begin(), std::istreambuf_iterator<char>(ifs), {});
107
- this->fileSize = this->current_data.size();
108
this->bytesRead = this->fileSize;
109
110
return true;
0 commit comments