X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/48b980fed3435926e0b3a8d72ecb58be703a1c7a..729e4ab9bc6618bc3d8a898e575df7f4019e29ca:/icuSources/common/uvectr32.h diff --git a/icuSources/common/uvectr32.h b/icuSources/common/uvectr32.h index bec5dd42..ff49d499 100644 --- a/icuSources/common/uvectr32.h +++ b/icuSources/common/uvectr32.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2008, International Business Machines +* Copyright (C) 1999-2010, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -211,7 +211,7 @@ public: // UVector32 inlines inline UBool UVector32::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) { - if (capacity >= minimumCapacity) { + if ((minimumCapacity >= 0) && (capacity >= minimumCapacity)) { return TRUE; } else { return expandCapacity(minimumCapacity, status);