From c53989495b050cc9d45f4fd561e9e77ab7be0b94 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Wed, 8 May 2024 14:39:03 +0300 Subject: [PATCH] fix condition in xml_elem_next() --- include/xml/impl/impl_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xml/impl/impl_common.h b/include/xml/impl/impl_common.h index 58d54d3..472ba50 100644 --- a/include/xml/impl/impl_common.h +++ b/include/xml/impl/impl_common.h @@ -64,7 +64,7 @@ xml_elem_next(const xml_t * __restrict current, const char * __restrict name) { xml_t *iter; size_t namesize; - if (!current || !name || (iter = current->next)) + if (!current || !name || !(iter = current->next)) return NULL; namesize = strlen(name);