summaryrefslogtreecommitdiff
path: root/src/drumkitparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r--src/drumkitparser.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc
index 8746ae0..b3f3b99 100644
--- a/src/drumkitparser.cc
+++ b/src/drumkitparser.cc
@@ -242,5 +242,9 @@ int DrumKitParser::readData(std::string& data, std::size_t size)
return -1;
}
+ data.resize(size);
+ auto nr_of_bytes_read = fread((void*)data.data(), 1, size, fd);
+ data.resize(nr_of_bytes_read);
+ return nr_of_bytes_read;
return fread((char*)data.c_str(), 1, size, fd);
}