Merge pull request #19 from herzi/master

small code adjustments
This commit is contained in:
Kevin Lange 2012-07-03 09:30:08 -07:00
commit bc1cda50dc
1 changed files with 2 additions and 2 deletions

View File

@ -483,7 +483,7 @@ int main(int argc, char ** argv) {
/* Begin Extended Option Mode */ /* Begin Extended Option Mode */
sb_mode = 1; sb_mode = 1;
sb_len = 0; sb_len = 0;
memset(sb, 0, 1024); memset(sb, 0, sizeof(sb));
break; break;
case IAC: case IAC:
/* IAC IAC? That's probably not right. */ /* IAC IAC? That's probably not right. */
@ -494,7 +494,7 @@ int main(int argc, char ** argv) {
} }
} else if (sb_mode) { } else if (sb_mode) {
/* Extended Option Mode -> Accept character */ /* Extended Option Mode -> Accept character */
if (sb_len < 1023) { if (sb_len < sizeof(sb) - 1) {
/* Append this character to the SB string, /* Append this character to the SB string,
* but only if it doesn't put us over * but only if it doesn't put us over
* our limit; honestly, we shouldn't hit * our limit; honestly, we shouldn't hit