aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cInput.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cInput.cpp b/src/cInput.cpp
index 6384c91..32da417 100644
--- a/src/cInput.cpp
+++ b/src/cInput.cpp
@@ -23,8 +23,9 @@ cInput::~cInput()
sInputEvent cInput::poll()
{
+ const unsigned int buff_len = 5;
sInputEvent ret;
- unsigned char buff [6];
+ unsigned char buff [buff_len];
//setup for select
fd_set rfds;
@@ -47,7 +48,7 @@ sInputEvent cInput::poll()
}
else if (buff[0] == '\x1B') //Escape sequence
{
- read (STDIN_FILENO, &buff, 5);
+ read (STDIN_FILENO, &buff, buff_len);
if(buff[0] == '[')
{
if(buff[1] == 'M') //Mouse Event