Explorar el Código

Welp, looks like I forogt a +1 for the null character

Eiyeron Fulmincendii hace 9 años
padre
commit
11169e388c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      platform/sfml/Quirks.cpp

+ 1 - 1
platform/sfml/Quirks.cpp

@@ -17,7 +17,7 @@ void Quirks::deinit()
 
 std::unique_ptr<char> Quirks::solve_absolute_path(const char *path)
 {
-    std::unique_ptr<char> result(new char[strlen(path)]);
+    std::unique_ptr<char> result(new char[strlen(path)+1]);
     strcpy(result.get(), path);
     return result;
 }