Commit 92b9d138 authored by Claes Sjofors's avatar Claes Sjofors

Check in command 'set window' that width or height is nonzero

parent 4bcb67da
......@@ -1363,7 +1363,7 @@ static int wnav_set_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/WIDTH", arg2_str, sizeof(arg2_str))))
{
nr = sscanf( arg2_str, "%d", &width);
if ( nr != 1)
if ( nr != 1 || width == 0)
{
wnav->message('E',"Syntax error");
return WNAV__SYNTAX;
......@@ -1373,7 +1373,7 @@ static int wnav_set_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/HEIGHT", arg2_str, sizeof(arg2_str))))
{
nr = sscanf( arg2_str, "%d", &height);
if ( nr != 1)
if ( nr != 1 || height == 0)
{
wnav->message('E',"Syntax error");
return WNAV__SYNTAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment