bad results on gcc with const char* -> char* conversion
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5957 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8ea01b6976
commit
f56537a20b
1 changed files with 8 additions and 4 deletions
|
@ -328,15 +328,19 @@ void my_convert_free(char *converted_path)
|
||||||
|
|
||||||
int my_open(const char *pathname, int flags)
|
int my_open(const char *pathname, int flags)
|
||||||
{
|
{
|
||||||
PATH_CONVERT(pathname);
|
char *converted_pathname = my_convert(pathname);
|
||||||
int result = open(pathname, flags);
|
|
||||||
|
int result = open(converted_pathname, flags);
|
||||||
|
my_convert_free(converted_pathname);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *my_fopen(const char *path, const char *mode)
|
FILE *my_fopen(const char *path, const char *mode)
|
||||||
{
|
{
|
||||||
PATH_CONVERT(path);
|
char *converted_path = my_convert(path);
|
||||||
FILE *result = fopen(path, mode);
|
|
||||||
|
FILE *result = fopen(converted_path, mode);
|
||||||
|
my_convert_free(converted_path);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif//!_WIN32
|
#endif//!_WIN32
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue