]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix warning
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 3 Oct 2012 12:45:39 +0000 (07:45 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 3 Oct 2012 12:45:39 +0000 (07:45 -0500)
src/mod/applications/mod_commands/mod_commands.c

index 38e85a47c26ed3f62589d77666fad318d384c4f6..f1a9953fdeb93638be13863787e61a368b48779b 100644 (file)
@@ -299,7 +299,7 @@ SWITCH_STANDARD_API(version_function)
 
        argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 
-       if (argv[0] && switch_stristr("short", argv[0])) {
+       if (argc > 0 && switch_stristr("short", argv[0])) {
                stream->write_function(stream, "%s.%s.%s\n", SWITCH_VERSION_MAJOR,SWITCH_VERSION_MINOR,SWITCH_VERSION_MICRO);
        } else {
                stream->write_function(stream, "FreeSWITCH Version %s (%s)\n", SWITCH_VERSION_FULL, SWITCH_VERSION_FULL_HUMAN);