diff options
Diffstat (limited to 'src/Subtitles/TextFile.cpp')
-rw-r--r-- | src/Subtitles/TextFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Subtitles/TextFile.cpp b/src/Subtitles/TextFile.cpp index 2a64547a8..fe85256b7 100644 --- a/src/Subtitles/TextFile.cpp +++ b/src/Subtitles/TextFile.cpp @@ -187,7 +187,7 @@ void CTextFile::WriteString(LPCWSTR lpsz/*CStringW str*/) Write((LPCSTR)stra, stra.GetLength());
} else if(m_encoding == UTF8) {
str.Replace(L"\n", L"\r\n");
- for(size_t i = 0; i < str.GetLength(); i++) {
+ for(int i = 0; i < str.GetLength(); i++) {
DWORD c = (WORD)str[i];
if(0 <= c && c < 0x80) { // 0xxxxxxx
@@ -211,7 +211,7 @@ void CTextFile::WriteString(LPCWSTR lpsz/*CStringW str*/) Write((LPCWSTR)str, str.GetLength()*2);
} else if(m_encoding == BE16) {
str.Replace(L"\n", L"\r\n");
- for(size_t i = 0; i < str.GetLength(); i++) {
+ for(int i = 0; i < str.GetLength(); i++) {
str.SetAt(i, ((str[i]>>8)&0x00ff)|((str[i]<<8)&0xff00));
}
Write((LPCWSTR)str, str.GetLength()*2);
|