Fix a terrible mistake in TIKI_FindTiki with uninitialized variable

This was using an uninitialized buffer to find the cached TIKI, in most configurations it always returned false, but when compiled with GCC it would return true
This commit is contained in:
smallmodel 2024-12-18 19:31:21 +01:00 committed by GitHub
parent 7e15c2ac1b
commit bd021b109c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,6 +83,9 @@ dtiki_t *TIKI_FindTiki(const char *path)
if (tikicache) {
dtiki_t **t;
Q_strncpyz(filename, path, sizeof(filename));
FS_CanonicalFilename(filename);
t = tikicache->find(filename);
if (t) {
return *t;