Skip to content

Commit

Permalink
xrCore: fix undefined behavior (method return stack-allocated object)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Dec 4, 2018
1 parent 30eeb23 commit ccb682f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/xrCore/LocatorAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1559,10 +1559,8 @@ CLocatorAPI::files_it CLocatorAPI::file_find_it(pcstr fname)
VERIFY(xr_strlen(fname) * sizeof(char) < sizeof(file_name));
xr_strcpy(file_name, sizeof file_name, fname);
desc_f.name = file_name;
// desc_f.name = xr_strlwr(xr_strdup(fname));
files_it I = m_files.find(desc_f);
// xr_free (desc_f.name);
return I;

return m_files.find(desc_f);
}

bool CLocatorAPI::dir_delete(pcstr initial, pcstr nm, bool remove_files)
Expand Down

0 comments on commit ccb682f

Please sign in to comment.