Fix comparison of file extension with extensions for the file type -
compare extension with extension, not dot-plus-extension with extension. Skip unnecesary test. Clean up white space. svn path=/trunk/; revision=42803
This commit is contained in:
parent
8f5f906146
commit
322c827a42
|
@ -338,8 +338,11 @@ win32_save_as_file(HWND h_wnd, action_after_save_e action_after_save, gpointer a
|
|||
Start out assuming we need to add the default one. */
|
||||
add_extension = TRUE;
|
||||
if (file_last_dot != NULL) {
|
||||
/* Skip past the dot. */
|
||||
file_last_dot++;
|
||||
|
||||
/* OK, see if the file has one of those extensions. */
|
||||
for (extension = extensions_list; extension != NULL && file_last_dot != NULL;
|
||||
for (extension = extensions_list; extension != NULL;
|
||||
extension = g_slist_next(extension)) {
|
||||
if (g_ascii_strcasecmp((char *)extension->data, file_last_dot) == 0) {
|
||||
/* The file name has one of the extensions for this file type */
|
||||
|
@ -512,8 +515,11 @@ win32_export_specified_packets_file(HWND h_wnd) {
|
|||
Start out assuming we need to add the default one. */
|
||||
add_extension = TRUE;
|
||||
if (file_last_dot != NULL) {
|
||||
/* Skip past the dot. */
|
||||
file_last_dot++;
|
||||
|
||||
/* OK, see if the file has one of those extensions. */
|
||||
for (extension = extensions_list; extension != NULL && file_last_dot != NULL;
|
||||
for (extension = extensions_list; extension != NULL;
|
||||
extension = g_slist_next(extension)) {
|
||||
if (g_ascii_strcasecmp((char *)extension->data, file_last_dot) == 0) {
|
||||
/* The file name has one of the extensions for this file type */
|
||||
|
|
Loading…
Reference in New Issue