diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder/OpusReader.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/decoder/OpusReader.hxx b/src/decoder/OpusReader.hxx index 1fd07b55c..7e161fd0f 100644 --- a/src/decoder/OpusReader.hxx +++ b/src/decoder/OpusReader.hxx @@ -21,7 +21,6 @@ #define MPD_OPUS_READER_HXX #include "check.h" -#include "string_util.h" #include <stdint.h> #include <string.h> @@ -91,7 +90,10 @@ public: if (src == nullptr) return nullptr; - return strndup(src, length); + char *dest = new char[length + 1]; + memcpy(dest, src, length); + dest[length] = 0; + return dest; } }; |