summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-04-26 12:49:41 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-04-26 12:49:41 +0200
commitff41e663c541b5e5e7cbb4eb85b96b8dc2b766ad (patch)
tree60671a13b3ee3e8af6f5deb047e97093336f6a65 /src
parent055dba2c1803a81027ce2cca96ae21a5b1b1fdb9 (diff)
parent708ba0078f8087b813bd7fb0c8cab64a0e09802e (diff)
downloadtermgl-ff41e663c541b5e5e7cbb4eb85b96b8dc2b766ad.tar.gz
Merge branch 'master' of github.com:kompetenzbolzen/TermGL
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