tests/format_check_test.c : Fix segfault.

This commit is contained in:
Erik de Castro Lopo 2011-05-01 02:42:30 +10:00
parent 4d13639134
commit 837e348993
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* tests/format_check_test.c
Fix segfault in test program.
2011-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* tests/format_check_test.c

View File

@ -81,6 +81,11 @@ format_check_test (void)
sf_close (sndfile) ;
unlink (filename) ;
if (major_fmt_info.extension != NULL && strcmp (major_fmt_info.extension, "sd2") == 0)
{ snprintf (filename, sizeof (filename), "._format-check.%s", major_fmt_info.extension) ;
unlink (filename) ;
} ;
exit_if_true (
sndfile && NOT (check_is_valid),
"\n\nError : Format was not valid but file opened correctly.\n"