summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nsMBCSGroupProber.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nsMBCSGroupProber.cpp b/src/nsMBCSGroupProber.cpp
index 8388832..8318cbd 100644
--- a/src/nsMBCSGroupProber.cpp
+++ b/src/nsMBCSGroupProber.cpp
@@ -327,8 +327,19 @@ nsProbingState nsMBCSGroupProber::HandleData(const char* aBuf, PRUint32 aLen,
else
{
for (PRUint32 i = 0; i < NUM_OF_PROBERS; i++)
+ {
if (codePointBuffer[i])
+ {
+ if (codePointBufferIdx[i] == codePointBufferSize[i] - 1)
+ {
+ for (PRUint32 j = 0; j < NUM_OF_LANGUAGES; j++)
+ langDetectors[i][j]->HandleData(codePointBuffer[i], codePointBufferIdx[i]);
+ codePointBufferIdx[i] = 0;
+ }
+
codePointBuffer[i][(codePointBufferIdx[i])++] = aBuf[pos];
+ }
+ }
}
}