diff --git a/THANKS b/THANKS index a518bee..1ac326b 100644 --- a/THANKS +++ b/THANKS @@ -3,6 +3,7 @@ $Id$ Derk-Jan Hartman - Gentoo ebuild file Gildas Bazin - win32 driver improvements Jan Hubicka - aafire +Ladislav Hagara - Source Mage spell Michele Bini - original SDL plasma Philip Balinov - Slackware package Richard Zidlicky - rpm specfile diff --git a/src/event.c b/src/event.c index 0d33643..c47e3df 100644 --- a/src/event.c +++ b/src/event.c @@ -278,7 +278,7 @@ static unsigned int _lowlevel_event(void) h = (xevent.xconfigure.height + x11_font_height / 3) / x11_font_height; - if(w == _caca_width && h == _caca_height) + if(!w || !h || (w == _caca_width && h == _caca_height)) continue; x11_new_width = w; @@ -370,6 +370,7 @@ static unsigned int _lowlevel_event(void) if(_caca_resize_event) { _caca_resize_event = 0; + _caca_resize = 1; return CACA_EVENT_RESIZE; } @@ -553,6 +554,7 @@ static unsigned int _lowlevel_event(void) if(_caca_resize_event) { _caca_resize_event = 0; + _caca_resize = 1; return CACA_EVENT_RESIZE; } @@ -723,7 +725,7 @@ static unsigned int _lowlevel_event(void) #if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO) static void _push_event(unsigned int event) { - if(events == EVENTBUF_LEN) + if(!event || events == EVENTBUF_LEN) return; eventbuf[events] = event; events++; diff --git a/src/graphics.c b/src/graphics.c index b50b9f7..9c63575 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -443,9 +443,9 @@ void caca_putstr(int x, int y, char const *s) if(x < 0) { - len -= -x; - if(len < 0) + if(len < (unsigned int)-x) return; + len -= -x; s += -x; x = 0; }