mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-12 07:26:42 +00:00
Do not use unexistent apis like RFile.extension()
This commit is contained in:
parent
03e6e9ab3c
commit
9935bbece0
@ -1254,10 +1254,11 @@ static bool is_executable(const char *file) {
|
||||
return is_executable_header (file);
|
||||
}
|
||||
#elif __WINDOWS__
|
||||
char *ext = r_file_extension (file);
|
||||
const bool is_exe = !strcmp (ext, "exe") || !strcmp (ext, "com") || !strcmp (ext, "bat");
|
||||
free (ext);
|
||||
return is_exe;
|
||||
const char *ext = r_str_lchr (file, '.');
|
||||
if (ext) {
|
||||
ext++;
|
||||
return !strcmp (ext, "exe") || !strcmp (ext, "com") || !strcmp (ext, "bat");
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user