From 04e088e65942b7f6fdd80c4e54768dca987ff9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Wed, 23 Mar 2016 15:07:17 +0100 Subject: Fix horribly stupid bug. --- src/drumkitparser.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/drumkitparser.cc') diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc index eb0913a..7f798a8 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); } -- cgit v1.2.3