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:
+3
-2
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user