Fix handling of named priorities.

Any name not in the list of priorities made the screen get hidden. Now
the server returns an error message.
Discovered by lint(1).
This commit is contained in:
mmdolze
2009-05-14 06:15:59 +00:00
parent 640fcc1f1f
commit 38fa2720cf
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -214,12 +214,13 @@ screen_find_widget(Screen *s, char *id)
/** Convert a priority name to the priority id.
* \param priname Name of the screen priority.
* \return Priority id associatited with \c priname.
* \return Priority id associated with \c priname, -1 if no matching priority
* id could be found.
*/
Priority
screen_pri_name_to_pri(char *priname)
{
Priority pri = WID_NONE;
Priority pri = -1;
int i;
for (i = 0; pri_names[i]; i++) {