소스 검색

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

Eiyeron Fulmincendii 9 년 전
부모
커밋
11169e388c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
 }