Assume 1 if priority was not specified

This commit is contained in:
Nikita Ivanov 2022-06-10 11:46:31 +05:00
parent 7e524e0687
commit ee2746e240
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -170,7 +170,7 @@ static int priority(Token tok)
EXPECT(TOK_STR);
Token number = token;
EXPECT(TOK_INT);
int i = accept(TOK_INT) == STAT_OK ? number.val.i : 1;
char *name_str = get_str(name);
if (add_priority(name_str, i) != OK) {