fix version string

master
Niko PLP 1 year ago
parent 2026e3002e
commit bfec780a58
  1. 3
      librocksdb-sys/api/c.cc

@ -3,8 +3,9 @@
#include "c.h" #include "c.h"
static char* CopyString(const std::string& str) { static char* CopyString(const std::string& str) {
char* result = reinterpret_cast<char*>(malloc(sizeof(char) * str.size())); char* result = reinterpret_cast<char*>(malloc(sizeof(char) * str.size()+1));
memcpy(result, str.data(), sizeof(char) * str.size()); memcpy(result, str.data(), sizeof(char) * str.size());
result[sizeof(char) * str.size()] = 0;
return result; return result;
} }

Loading…
Cancel
Save