mirror of https://github.com/odrling/Aegisub
Fix a regression introduced by Plorkyeran's iconv patch that caused the text file reader to throw an exception when trying to read an empty file.
Originally committed to SVN as r3146.
This commit is contained in:
parent
c33ed91b12
commit
491fa10ff1
|
@ -133,6 +133,8 @@ wchar_t TextFileReader::GetWChar() {
|
|||
|
||||
file.read(inbuf, inbytesleft);
|
||||
inbytesleft = file.gcount();
|
||||
if (inbytesleft == 0)
|
||||
return 0;
|
||||
|
||||
do {
|
||||
size_t ret = iconv(conv, &inptr, &inbytesleft, reinterpret_cast<char **>(&outptr), &outbytesleft);
|
||||
|
|
Loading…
Reference in New Issue