ICU-21271 Fix valgrind failure in dtptngen.cpp
diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp
index 02be4f0..32d3fc4 100644
--- a/icu4c/source/i18n/dtptngen.cpp
+++ b/icu4c/source/i18n/dtptngen.cpp
@@ -893,7 +893,7 @@
             err = localStatus;
             return;
         }
-        if (calendarTypeLen < ULOC_KEYWORDS_CAPACITY) {
+        if (calendarTypeLen > 0 && calendarTypeLen < ULOC_KEYWORDS_CAPACITY) {
             destination.clear().append(calendarType, -1, err);
             if (U_FAILURE(err)) { return; }
         }