mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
ensure id list not empty
This commit is contained in:
parent
08d205d377
commit
e790367b1e
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ fn search_node_for_text_with_argument<'a>(
|
|||
/// ensure a list of ids contains only numbers and commas, returning unchanged if true
|
||||
/// used by nid: and cid:
|
||||
fn check_id_list(s: Cow<str>) -> ParseResult<Cow<str>> {
|
||||
if s.as_bytes().iter().any(|&c| !is_digit(c) && c != b',') {
|
||||
if s.is_empty() || s.as_bytes().iter().any(|&c| !is_digit(c) && c != b',') {
|
||||
Err(ParseError {})
|
||||
} else {
|
||||
Ok(s)
|
||||
|
|
Loading…
Reference in a new issue