diff options
Diffstat (limited to 'cpp/src/IceGrid/Parser.cpp')
-rw-r--r-- | cpp/src/IceGrid/Parser.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 6ac66177ee0..461cf7b8996 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -1341,8 +1341,16 @@ Parser::dumpFile(const string& reader, const list<string>& origArgs) int maxBytes = _communicator->getProperties()->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024) * 1024; if(head || tail) { - istringstream is(head ? opts.optArg("head") : opts.optArg("tail")); - is >> lineCount; + if(head) + { + istringstream is(opts.optArg("head")); + is >> lineCount; + } + else + { + istringstream is(opts.optArg("tail")); + is >> lineCount; + } if(lineCount <= 0) { invalidCommand("invalid argument for -h | --head or -t | --tail option"); |