From 2097d927f170f09d390e10fb397d13a8c43dea7f Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sat, 6 Mar 2010 15:51:12 +0000 Subject: [PATCH] [CRT] sync fseek with wine 1.1.40 (all msvcrt file tests pass now) svn path=/trunk/; revision=45952 --- reactos/lib/sdk/crt/stdio/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/lib/sdk/crt/stdio/file.c b/reactos/lib/sdk/crt/stdio/file.c index 08213a69390..a3540ce28bd 100644 --- a/reactos/lib/sdk/crt/stdio/file.c +++ b/reactos/lib/sdk/crt/stdio/file.c @@ -914,6 +914,9 @@ int CDECL fseek(FILE* file, long offset, int whence) if (file->_ptr[i] == '\n') offset--; } + /* Black magic when reading CR at buffer boundary*/ + if(fdesc[file->_file].wxflag & WX_READCR) + offset--; } } /* Discard buffered input */