ref: 00ee155176ee1b191b8d0d9efbd82e43787265c1
parent: db2f079266b1c34f42c65034db048e1f20ba3fc6
author: Clownacy <[email protected]>
date: Wed Apr 1 17:58:02 EDT 2020
Fixes and a comment
--- a/src/Backends/Platform/SDL2.cpp
+++ b/src/Backends/Platform/SDL2.cpp
@@ -1,5 +1,9 @@
#include "../Platform.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+
#include "SDL.h"
#include "../Rendering.h"
@@ -57,6 +61,7 @@
BOOL PlatformBackend_GetBasePath(char *string_buffer)
{
char *base_path = SDL_GetBasePath();
+ // Trim the trailing '/'
size_t base_path_length = strlen(base_path);
base_path[base_path_length - 1] = '\0';
strcpy(string_buffer, base_path);