diff options
author | kdx <kikoodx@paranoici.org> | 2023-01-01 05:02:24 +0100 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-01-01 05:02:24 +0100 |
commit | 86fc4a34a99ff2f8205cab1098bd149a0a700002 (patch) | |
tree | 8c2c249ced04382a4775428b5b0c9521d9fe63b0 | |
parent | 04c3f105faa6c7109f38f617890fedf8235a3e12 (diff) | |
download | lzr-86fc4a34a99ff2f8205cab1098bd149a0a700002.tar.gz |
strdup rename for windows compilation
-rw-r--r-- | lzr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -50,7 +50,7 @@ static Mix_Chunk *sounds[LZR_MAX_SOUNDS] = {0}; static Mix_Music *music = NULL; #endif -static char *_strdup(const char *str) +static char *_lzrstrdup(const char *str) { char *const cpy = malloc(strlen(str) + 1); if (cpy == NULL) @@ -293,7 +293,7 @@ char *LZR_PathPrefix(const char *path) } if (basepath == NULL) { SDL_Log("basepath is NULL"); - return _strdup(path); + return _lzrstrdup(path); } char *const buf = malloc(strlen(basepath) + strlen(path) + 1); if (buf == NULL) { @@ -349,7 +349,7 @@ int LZR_ImageLoad(const char *path) SDL_Log("%s", SDL_GetError()); return -1; } - images[i].path = _strdup(path); + images[i].path = _lzrstrdup(path); return i; } |