Fix icu_tokenizer_clone (ubrk_safeClone)
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 2 Feb 2010 11:26:20 +0000 (12:26 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 2 Feb 2010 11:26:20 +0000 (12:26 +0100)
src/icu_tokenizer.c

index e8d3123..d6ec7fe 100644 (file)
@@ -61,8 +61,8 @@ static void icu_tokenizer_reset(struct icu_tokenizer *tokenizer,
 
 struct icu_tokenizer *icu_tokenizer_clone(struct icu_tokenizer *old)
 {
-    uint32_t bufferSize = 10000;
-    UErrorCode status = 0;
+    int32_t bufferSize = U_BRK_SAFECLONE_BUFFERSIZE;
+    UErrorCode status = U_ZERO_ERROR;
     struct icu_tokenizer * tokenizer
         = (struct icu_tokenizer *) xmalloc(sizeof(struct icu_tokenizer));