richedit: Fixed mistake that didn't cause a bug.
The check to see if the dwOutputBuffer is full was performed incorrectly in RTFPutUnicodeString, however, this mistake was actually harmless since it would just cause an extra loop that does nothing, then the check would work properly with the variable fit equal to 0.
This commit is contained in:
parent
632015dc62
commit
ee6b6f338e
|
@ -2667,10 +2667,10 @@ RTFPutUnicodeString(RTF_Info *info, const WCHAR *string, int length)
|
||||||
|
|
||||||
memmove(info->OutputBuffer + info->dwOutputCount, string, fit * sizeof(WCHAR));
|
memmove(info->OutputBuffer + info->dwOutputCount, string, fit * sizeof(WCHAR));
|
||||||
info->dwOutputCount += fit;
|
info->dwOutputCount += fit;
|
||||||
if (fit == sizeof(info->OutputBuffer) / sizeof(WCHAR) - info->dwOutputCount)
|
|
||||||
RTFFlushUnicodeOutputBuffer(info);
|
|
||||||
length -= fit;
|
length -= fit;
|
||||||
string += fit;
|
string += fit;
|
||||||
|
if (sizeof(info->OutputBuffer) / sizeof(WCHAR) == info->dwOutputCount)
|
||||||
|
RTFFlushUnicodeOutputBuffer(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue