Browse Source

Bugfix: DevAPI: Avoid infinite hang in set_device help

Luke Dashjr 11 years ago
parent
commit
ed6bf4104f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      deviceapi.c

+ 1 - 1
deviceapi.c

@@ -862,7 +862,7 @@ nohelp:
 	
 	size_t matchlen = 0;
 	if (newvalue)
-		while (!isspace(newvalue[0]))
+		while (newvalue[matchlen] && !isspace(newvalue[matchlen]))
 			++matchlen;
 	
 	for ( ; sdf->optname; ++sdf)