fix off by 1 in console cmd handling. Thanks trixter for identifying this.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1616 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-06-13 21:41:16 +00:00
parent 76dfa310c0
commit 6a98739f2e

View File

@ -198,7 +198,7 @@ SWITCH_DECLARE(void) switch_console_loop(void)
}
memset(&cmd, 0, sizeof(cmd));
for (x = 0; x < sizeof(cmd); x++) {
for (x = 0; x < (sizeof(cmd)-1); x++) {
cmd[x] = (char) getchar();
if (cmd[x] == '\n') {
cmd[x] = '\0';