From 5a752d6e908ea8b244528b68ad6fbed793638ffd Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Mon, 28 Jul 2008 16:08:34 -0500 Subject: [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 --- tools/h5repack/h5repack_main.c | 10 +++++----- 1 file 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; } } -- cgit v0.12