aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-03-05 16:40:10 +0100
committerBoris Faure <billiob@gmail.com>2017-03-05 16:40:10 +0100
commit566dc187d67b3a16e49aa19c50b989419d3465c0 (patch)
tree099784c1badd1c63466b6b77235e1ab755a10df9
parenttermio: remove dead code. CID1371738 (diff)
downloadterminology-566dc187d67b3a16e49aa19c50b989419d3465c0.tar.gz
termio: reset size when size looks boggus.
Patch by netstar
-rw-r--r--src/bin/termio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index e82e9ae..ff14490 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -5088,8 +5088,11 @@ _smart_size(Evas_Object *obj, int w, int h, Eina_Bool force)
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN(sd);
- if (w <= 1) w = 80;
- if (h <= 1) h = 24;
+ if ((w <= 1) || (h <= 1))
+ {
+ w = 80;
+ h = 24;
+ }
if (!force)
{