projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c48012
)
add an additional check in resize() to prevent a crash of dwm
author
Anselm R. Garbe
<arg@suckless.org>
Thu, 29 Mar 2007 13:17:57 +0000
(15:17 +0200)
committer
Anselm R. Garbe
<arg@suckless.org>
Thu, 29 Mar 2007 13:17:57 +0000
(15:17 +0200)
client.c
patch
|
blob
|
history
diff --git
a/client.c
b/client.c
index 184471342d37c506cb5edf99f99997a2fce0e7c4..282ad531d731d9957b59760d47aa504075f5f281 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-233,7
+233,7
@@
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
if(w <= 0 || h <= 0)
return;
if(sizehints) {
- if(c->minay > 0 && c->maxay && (h - c->baseh) > 0) {
+ if(c->minay > 0 && c->maxay
> 0
&& (h - c->baseh) > 0) {
dx = (float)(w - c->basew);
dy = (float)(h - c->baseh);
min = (float)(c->minax) / (float)(c->minay);
@@
-267,6
+267,8
@@
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
if(c->inch)
h -= (h - c->baseh) % c->inch;
}
+ if(w <= 0 || h <= 0)
+ return;
if(w == sw && h == sh)
c->border = 0;
else