mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
FIX: MAX_PATH is used within Windows headers, we should use a different define internally
Replace MAX_PATH usage with EMU_MAX_PATH, this prevents the redefine warning, and ensures that we don't mess up other usages (which will likely want MAX_PATH as 260, like Windows defines, not 4096 like we do). The replacement has been done based on what MSVC was telling me the define values were at each point (i.e. whether we wanted it or not, these usages were using our 4906 value, not the 260 value from Windows)
This commit is contained in:
parent
e8e3a3b2a2
commit
2c8b3f05ac
3 changed files with 8 additions and 8 deletions
|
|
@ -121,7 +121,7 @@ void cmac_hash_forge(unsigned char *key, int key_len, unsigned char *in, int in_
|
|||
aes_cmac(&ctx, in_len, in, hash);
|
||||
}
|
||||
|
||||
char* extract_file_name(const char* file_path, char real_file_name[MAX_PATH])
|
||||
char* extract_file_name(const char* file_path, char real_file_name[CRYPTO_MAX_PATH])
|
||||
{
|
||||
std::string_view v(file_path);
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ char* extract_file_name(const char* file_path, char real_file_name[MAX_PATH])
|
|||
v.remove_prefix(pos + 1);
|
||||
}
|
||||
|
||||
gsl::span r(real_file_name, MAX_PATH);
|
||||
gsl::span r(real_file_name, CRYPTO_MAX_PATH);
|
||||
strcpy_trunc(r, v);
|
||||
return real_file_name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue