File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -743,23 +743,17 @@ int main( int argc, char **argv ) {
743743
744744 if ((extract || rewrite || create ) && (s_copy_buffer = (char * )malloc (READWRITE_BUFFER_SIZE )) == NULL ) mem_err ();
745745
746+ }
747+
748+ if (!err ) {
746749 locale_arr = cp1252_locales ;
747- while (* locale_arr ) {
748- locale = setlocale (LC_ALL , * locale_arr );
749- if (locale ) break ;
750- locale_arr ++ ;
751- }
750+ while (* locale_arr && !locale ) locale = setlocale (LC_ALL , * locale_arr ++ );
752751 if (locale ) s_cp1252 = true;
753752 else {
754753 locale_arr = utf8_locales ;
755- while (* locale_arr ) {
756- locale = setlocale (LC_ALL , * locale_arr );
757- if (locale ) break ;
758- locale_arr ++ ;
759- }
754+ while (* locale_arr && !locale ) locale = setlocale (LC_ALL , * locale_arr ++ );
760755 if (!locale ) exiso_warn ("Using %s locale. Non-ASCII characters will probably not be represented correctly." , setlocale (LC_ALL , NULL ));
761756 }
762-
763757 }
764758
765759 if ( ! err && ( create || rewrite ) ) err = boyer_moore_init ( XISO_MEDIA_ENABLE , XISO_MEDIA_ENABLE_LENGTH , k_default_alphabet_size );
You can’t perform that action at this time.
0 commit comments