summaryrefslogtreecommitdiff
path: root/plugins/MimCmd/src/MimCmd.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-16 18:02:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-16 18:02:49 +0000
commitecaad6776b0348b9e9d851b74d68f707f1722e24 (patch)
treeb496be513a21639f2ca39f0290408be78f5f0eca /plugins/MimCmd/src/MimCmd.cpp
parent3d3376688a7a7ff1fe7838d350b31412c42d5ccd (diff)
compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@14214 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MimCmd/src/MimCmd.cpp')
-rw-r--r--plugins/MimCmd/src/MimCmd.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/plugins/MimCmd/src/MimCmd.cpp b/plugins/MimCmd/src/MimCmd.cpp
index 6836069241..fe3c98b56a 100644
--- a/plugins/MimCmd/src/MimCmd.cpp
+++ b/plugins/MimCmd/src/MimCmd.cpp
@@ -81,19 +81,24 @@ int main(int argc, char *argv[])
return MIMRES_NOMIRANDA;
}
- if (argc <= 1 || argc > MAX_ARGUMENTS)
+ if (argc <= 1 || argc > MAX_ARGUMENTS) {
PrintUsage();
+ return 0;
+ }
+
+ int error;
+ PReply reply = ParseCommand(argv, argc);
+ if (reply) {
+ error = reply->code;
+ lpprintf("%s\n", reply->message);
+ }
else {
- PReply reply = ParseCommand(argv, argc);
- if (reply) {
- error = reply->code;
- lpprintf("%s\n", reply->message);
- }
- else lpprintf(Translate("Unknown command '%s'.\n"), argv[1]);
-
- DestroyKnownCommands();
- DisconnectFromMiranda();
- DestroyClient();
+ lpprintf(Translate("Unknown command '%s'.\n"), argv[1]);
+ error = 0;
}
- return 0;
+
+ DestroyKnownCommands();
+ DisconnectFromMiranda();
+ DestroyClient();
+ return error;
}