Skip to content

Commit ea377a9

Browse files
committed
Check for empty vectors as well
1 parent d43f4bf commit ea377a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xml2_url.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "xml2_utils.h"
99

1010
const xmlChar* to_xml_chr(cpp11::strings x, const char* arg) {
11-
if (x.size() > 1) {
11+
if (x.size() != 1) {
1212
cpp11::stop("%s must be a character vector of length 1", arg);
1313
}
1414

0 commit comments

Comments
 (0)