Fix the build on CentOS 6

This commit is contained in:
Markus Gans 2018-10-24 08:51:38 +02:00
parent e359d16417
commit c4e333bc8b
3 changed files with 4 additions and 3 deletions

View File

@ -75,7 +75,7 @@ void term_boundaries (int& x, int& y)
if ( y < 0 )
y = 0;
if ( x >= term_width )
if ( x >= term_width && term_width > 0 )
{
y += x / term_width;
x %= term_width;

View File

@ -113,7 +113,7 @@ void FVTerm::setTermXY (int x, int y)
term_width = int(getColumnNumber());
term_height = int(getLineNumber());
if ( x >= term_width )
if ( x >= term_width && term_width > 0 )
{
y += x / term_width;
x %= term_width;

View File

@ -28,10 +28,11 @@
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <final/final.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <final/final.h>
#define CPPUNIT_ASSERT_CSTRING(expected, actual) \
check_c_string (expected, actual, CPPUNIT_SOURCELINE())