ICU-21269 ParagraphLayout complexTable: init & access based on actual values
diff --git a/icu4c/source/layoutex/ParagraphLayout.cpp b/icu4c/source/layoutex/ParagraphLayout.cpp
index 9e525cf..0a765a3 100644
--- a/icu4c/source/layoutex/ParagraphLayout.cpp
+++ b/icu4c/source/layoutex/ParagraphLayout.cpp
@@ -137,7 +137,7 @@
  * process, rather for all scripts which require
  * complex processing for correct rendering.
  */
-static const le_bool complexTable[scriptCodeCount] = {
+static const le_bool complexTable[] = {
     FALSE , /* Zyyy */
     FALSE,  /* Qaai */
     TRUE,   /* Arab */
@@ -974,7 +974,7 @@
 
 le_bool ParagraphLayout::isComplex(UScriptCode script)
 {
-    if (script < 0 || script >= (UScriptCode) scriptCodeCount) {
+    if (script < 0 || script >= ARRAY_SIZE(complexTable)) {
         return FALSE;
     }