mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Actually, this should be a memcpy().
We already know the exact length we just allocated, and we plan to append our own null terminator to the end of the copy, so this makes more sense.
This commit is contained in:
parent
38dc821b0a
commit
3984c7d8e3
@ -63,7 +63,7 @@ SDL_GetBasePath(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
strcpy(retval, str);
|
||||
SDL_memcpy(retval, str, len);
|
||||
retval[len] = '/';
|
||||
retval[len+1] = '\0';
|
||||
return retval;
|
||||
|
Loading…
Reference in New Issue
Block a user