diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-10-30 20:07:17 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-10-30 20:07:17 (GMT) |
commit | 1aa608c06bab83e16dfa677f0c528f2447ce6d65 (patch) | |
tree | 5dc60270c4220ec82ff00d3dfcb9fddb9f0eb01b | |
parent | b8bb79064999b5c0e1b695a7baebde63e3e27bf6 (diff) | |
download | hdf5-1aa608c06bab83e16dfa677f0c528f2447ce6d65.zip hdf5-1aa608c06bab83e16dfa677f0c528f2447ce6d65.tar.gz hdf5-1aa608c06bab83e16dfa677f0c528f2447ce6d65.tar.bz2 |
[svn-r14221]
bug fix: avoid a segmentation fault when number of arguments is just one
solution: test if number of arguments is more than 1
tested: windows, linux
-rw-r--r-- | tools/h5diff/h5diff_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index a5b9328..cf83c22 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -47,7 +47,7 @@ void parse_input(int argc, *------------------------------------------------------------------------- */ - if ( (strcmp("-V",argv[1])==0) ) + if ( argv[1] && (strcmp("-V",argv[1])==0) ) { print_version("h5diff"); h5diff_exit(EXIT_SUCCESS); |