diff options
| author | Petr Mrázek | 2011-07-16 10:31:49 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-07-16 10:31:49 +0200 |
| commit | 0d1dd5aeaddea60573777ac91aebaa8885f01e93 (patch) | |
| tree | 2b33de6ecba5e5bca043fdd84fa9da96d557d469 /library/Console-linux.cpp | |
| parent | 5563f28fdce4bd7db657ac1420114bd0821ceb7f (diff) | |
| download | dfhack-0d1dd5aeaddea60573777ac91aebaa8885f01e93.tar.gz dfhack-0d1dd5aeaddea60573777ac91aebaa8885f01e93.tar.bz2 dfhack-0d1dd5aeaddea60573777ac91aebaa8885f01e93.tar.xz | |
Extended escape sequences are 4 bytes, not 5.
Diffstat (limited to 'library/Console-linux.cpp')
| -rw-r--r-- | library/Console-linux.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp index 4679f683..56aa6ba6 100644 --- a/library/Console-linux.cpp +++ b/library/Console-linux.cpp @@ -392,7 +392,7 @@ namespace DFHack { char c; int nread; - char seq[2], seq2[2]; + char seq[2], seq2; SDL_mutexV(wlock); nread = ::read(fd,&c,1); SDL_mutexP(wlock); @@ -508,13 +508,13 @@ namespace DFHack { // extended escape SDL_mutexV(wlock); - if (::read(fd,seq2,2) == -1) + if (::read(fd,&seq2,1) == -1) { SDL_mutexP(wlock); break; } SDL_mutexP(wlock); - if (seq2[0] == '~' && seq[1] == '3') + if (seq[1] == '3' && seq2 == '~' ) { // delete if (raw_buffer.size() > 0 && raw_cursor < raw_buffer.size()) |
