From 27ce7a467e7a8f8d2c432ff8ca7df31121bd303d Mon Sep 17 00:00:00 2001 From: Eric Mader Date: Sat, 18 Mar 2006 00:04:26 +0000 Subject: [PATCH] ICU-4338 explicitly declare the size of per-script arrays. X-SVN-Rev: 19372 --- icu4c/source/layout/IndicClassTables.cpp | 4 ++-- icu4c/source/layoutex/ParagraphLayout.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/icu4c/source/layout/IndicClassTables.cpp b/icu4c/source/layout/IndicClassTables.cpp index bf739b58970..6a5ee6c04f5 100644 --- a/icu4c/source/layout/IndicClassTables.cpp +++ b/icu4c/source/layout/IndicClassTables.cpp @@ -1,6 +1,6 @@ /* * - * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2006 - All Rights Reserved * */ @@ -261,7 +261,7 @@ static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 3, SINH_SCRIPT_FL // // IndicClassTable addresses // -static const IndicClassTable * const indicClassTables[] = { +static const IndicClassTable * const indicClassTables[scriptCodeCount] = { NULL, /* 'zyyy' (COMMON) */ NULL, /* 'qaai' (INHERITED) */ NULL, /* 'arab' (ARABIC) */ diff --git a/icu4c/source/layoutex/ParagraphLayout.cpp b/icu4c/source/layoutex/ParagraphLayout.cpp index a6e4118f981..3165f123ad7 100644 --- a/icu4c/source/layoutex/ParagraphLayout.cpp +++ b/icu4c/source/layoutex/ParagraphLayout.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** - * Copyright (C) 2002-2005, International Business Machines + * Copyright (C) 2002-2006, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -10,6 +10,7 @@ * BreakIterator... */ #include "layout/LETypes.h" +#include "layout/LEScripts.h" #include "layout/LELanguages.h" #include "layout/LayoutEngine.h" #include "layout/LEFontInstance.h" @@ -131,7 +132,7 @@ le_int32 StyleRuns::getRuns(le_int32 runLimits[], le_int32 styleIndices[]) * process, rather for all scripts which require * complex processing for correct rendering. */ -static const le_bool complexTable[] = { +static const le_bool complexTable[scriptCodeCount] = { FALSE , /* Zyyy */ FALSE, /* Qaai */ TRUE, /* Arab */