diff options
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/parse.c b/src/parse.c index 48430b3..3a93806 100644 --- a/src/parse.c +++ b/src/parse.c @@ -747,6 +747,10 @@ do_single_keyword(int keyword) int do_string_keyword(int keyword, char *s) { + unsigned width = 0; + unsigned height = 0; + unsigned mask = 0; + switch (keyword) { case kws_UsePPosition: { @@ -797,20 +801,18 @@ do_string_keyword(int keyword, char *s) return 1; case kws_MaxWindowSize: - JunkMask = - (unsigned) XParseGeometry(s, &JunkX, &JunkY, &JunkWidth, - &JunkHeight); - if ((JunkMask & (WidthValue | HeightValue)) != + mask = (unsigned) XParseGeometry(s, &JunkX, &JunkY, &width, &height); + if ((mask & (WidthValue | HeightValue)) != (WidthValue | HeightValue)) { parseWarning("bad MaxWindowSize \"%s\"", s); return 0; } - if (JunkWidth <= 0 || JunkHeight <= 0) { + if (width <= 0 || height <= 0) { parseWarning("MaxWindowSize \"%s\" must be positive", s); return 0; } - Scr->MaxWindowWidth = (int) JunkWidth; - Scr->MaxWindowHeight = (int) JunkHeight; + Scr->MaxWindowWidth = (int) width; + Scr->MaxWindowHeight = (int) height; return 1; } |