diff options
author | Kevin Lange <k@dakko.us> | 2012-07-03 09:30:08 -0700 |
---|---|---|
committer | Kevin Lange <k@dakko.us> | 2012-07-03 09:30:08 -0700 |
commit | bc1cda50dc411a9a42d3bab3892e3688f2fb80bd (patch) | |
tree | 4b1739525c2fc1243511e635191f24f4a966dfb7 /src/nyancat.c | |
parent | afc4d6e25ed75379fd70eb4d984582d9dfc21056 (diff) | |
parent | fd6b3c6de21724f8dff524d602ef88c8b3128da7 (diff) | |
download | nyancat-bc1cda50dc411a9a42d3bab3892e3688f2fb80bd.tar.gz |
Merge pull request #19 from herzi/master
small code adjustments
Diffstat (limited to '')
-rw-r--r-- | src/nyancat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nyancat.c b/src/nyancat.c index 234ff10..fbb3c6e 100644 --- a/src/nyancat.c +++ b/src/nyancat.c @@ -483,7 +483,7 @@ int main(int argc, char ** argv) { /* Begin Extended Option Mode */ sb_mode = 1; sb_len = 0; - memset(sb, 0, 1024); + memset(sb, 0, sizeof(sb)); break; case IAC: /* IAC IAC? That's probably not right. */ @@ -494,7 +494,7 @@ int main(int argc, char ** argv) { } } else if (sb_mode) { /* Extended Option Mode -> Accept character */ - if (sb_len < 1023) { + if (sb_len < sizeof(sb) - 1) { /* Append this character to the SB string, * but only if it doesn't put us over * our limit; honestly, we shouldn't hit |