Encode test coverage increased to 100%
diff --git a/src/qcbor_encode.c b/src/qcbor_encode.c
index 3986cbb..aa0b991 100644
--- a/src/qcbor_encode.c
+++ b/src/qcbor_encode.c
@@ -111,7 +111,7 @@
 Nesting_Increment(QCBORTrackNesting *pNesting)
 {
 #ifndef QCBOR_DISABLE_ENCODE_USAGE_GUARDS
-   if(1 >= QCBOR_MAX_ITEMS_IN_ARRAY - pNesting->pCurrentNesting->uCount) {
+   if(pNesting->pCurrentNesting->uCount >= QCBOR_MAX_ITEMS_IN_ARRAY) {
       return QCBOR_ERR_ARRAY_TOO_LONG;
    }
 #endif /* ! QCBOR_DISABLE_ENCODE_USAGE_GUARDS */