diff options
author | Torbjörn Andersson | 2004-10-19 18:28:41 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-10-19 18:28:41 +0000 |
commit | 1fa79b09dea9f19fab2e321ef630db8309abfcc9 (patch) | |
tree | 2b3293bb346c46c0257fb2415b8d6bb2fd603ac1 | |
parent | 20e57d8bd59e906264d2dbf285638a86a761a933 (diff) | |
download | scummvm-rg350-1fa79b09dea9f19fab2e321ef630db8309abfcc9.tar.gz scummvm-rg350-1fa79b09dea9f19fab2e321ef630db8309abfcc9.tar.bz2 scummvm-rg350-1fa79b09dea9f19fab2e321ef630db8309abfcc9.zip |
Got rid of ungetc() to save Chrilith from the trouble of implementing it
himself on PalmOS.
svn-id: r15616
-rw-r--r-- | common/file.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/file.cpp b/common/file.cpp index 63073239df..d264574a17 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -318,8 +318,10 @@ char *File::gets(void *ptr, uint32 len) { if (c == CR) { c = getc(_handle); - if (c != LF) - ungetc(c, _handle); + // Don't use ungetc() here. It might be slightly more + // elegant, but PalmOS doesn't have it. + if (c != LF && c != EOF) + fseek(_handle, -1, SEEK_CUR); break; } |