diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-07-28 21:08:34 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-07-28 21:08:34 (GMT) |
commit | 5a752d6e908ea8b244528b68ad6fbed793638ffd (patch) | |
tree | a90055f85211556a50092524ed3d2fa352abdc7f /tools | |
parent | 82416cb36d5275e71d0cff30c13994a7bc6800f9 (diff) | |
download | hdf5-5a752d6e908ea8b244528b68ad6fbed793638ffd.zip hdf5-5a752d6e908ea8b244528b68ad6fbed793638ffd.tar.gz hdf5-5a752d6e908ea8b244528b68ad6fbed793638ffd.tar.bz2 |
[svn-r15421] bug fix
the parsing of the command line strings for the shared object header message type was not being done correctly (strcmp)
fix: substituted by strncmp
tested: windows, linux
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5repack/h5repack_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 73b6361..d512923 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -510,19 +510,19 @@ static void parse_command_line(int argc, const char* argv[], pack_opt_t* options strcpy(msgType, msgPtr+1); msgPtr[0] = '\0'; ssize = atoi( opt_arg ); - if (strcmp(msgType, "dspace") == 0) { + if (strncmp(msgType, "dspace",6) == 0) { options->msg_size[0] = ssize; } - else if (strcmp(msgType, "dtype") == 0) { + else if (strncmp(msgType, "dtype", 5) == 0) { options->msg_size[1] = ssize; } - else if (strcmp(msgType, "fill") == 0) { + else if (strncmp(msgType, "fill", 4) == 0) { options->msg_size[2] = ssize; } - else if (strcmp(msgType, "pline") == 0) { + else if (strncmp(msgType, "pline", 5) == 0) { options->msg_size[3] = ssize; } - else if (strcmp(msgType, "attr") == 0) { + else if (strncmp(msgType, "attr", 4) == 0) { options->msg_size[4] = ssize; } } |