Added check on directory in Local_Storage::file_exists

Added check on directory in Local_Storage::file_exists.
Added check in get_filenames_recursive if last char is the path separator (some use cases were adding a path separator even if there were already one).

In base.h, added check on s and r, that will avoid an out-of-range vector exception on Visual Studio, same for network.cpp.
This commit is contained in:
Nemirtingas 2019-06-17 23:08:23 +02:00
parent b093ca90d3
commit e54072918f
3 changed files with 15 additions and 4 deletions

View file

@ -93,7 +93,8 @@ struct Steam_Call_Result {
Steam_Call_Result(SteamAPICall_t a, int icb, void *r, unsigned int s, double r_in, bool run_cc_cb) {
api_call = a;
result.resize(s);
memcpy(&(result[0]), r, s);
if (s > 0 && r != NULL)
memcpy(&(result[0]), r, s);
created = std::chrono::high_resolution_clock::now();
run_in = r_in;
run_call_completed_cb = run_cc_cb;