=?UTF-8?Q?Iv=C3=A1n=20Matellanes=20?=: msvcirt: Fix implementation of streambuf::sync.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 12 07:36:13 CDT 2015


Module: wine
Branch: master
Commit: c69ac67206c833d7b44d18d4e928fd41005ef636
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c69ac67206c833d7b44d18d4e928fd41005ef636

Author: Iván Matellanes <matellanesivan at gmail.com>
Date:   Fri Jun 12 11:51:54 2015 +0200

msvcirt: Fix implementation of streambuf::sync.

---

 dlls/msvcirt/msvcirt.c       | 2 +-
 dlls/msvcirt/tests/msvcirt.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index ae644b3..8c05fe3 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -457,7 +457,7 @@ DEFINE_THISCALL_WRAPPER(streambuf_sync, 4)
 int __thiscall streambuf_sync(streambuf *this)
 {
     TRACE("(%p)\n", this);
-    return (this->gptr == this->egptr && this->pbase == this->pptr) ? 0 : EOF;
+    return (this->gptr >= this->egptr && this->pbase >= this->pptr) ? 0 : EOF;
 }
 
 /* ?unbuffered at streambuf@@IAEXH at Z */
diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c
index 3ee987b..1a6ce5d 100644
--- a/dlls/msvcirt/tests/msvcirt.c
+++ b/dlls/msvcirt/tests/msvcirt.c
@@ -372,7 +372,7 @@ static void test_streambuf(void)
     ok(ret == 0, "sync failed, expected 0 got %d\n", ret);
     sb.gptr = sb.egptr + 1;
     ret = (int) call_func1(p_streambuf_sync, &sb);
-    todo_wine ok(ret == 0, "sync failed, expected 0 got %d\n", ret);
+    ok(ret == 0, "sync failed, expected 0 got %d\n", ret);
     sb.gptr = sb.eback;
     ret = (int) call_func1(p_streambuf_sync, &sb2);
     ok(ret == EOF, "sync failed, expected EOF got %d\n", ret);
@@ -381,7 +381,7 @@ static void test_streambuf(void)
     ok(ret == 0, "sync failed, expected 0 got %d\n", ret);
     sb2.pptr = sb2.pbase - 1;
     ret = (int) call_func1(p_streambuf_sync, &sb2);
-    todo_wine ok(ret == 0, "sync failed, expected 0 got %d\n", ret);
+    ok(ret == 0, "sync failed, expected 0 got %d\n", ret);
     sb2.pptr = sb2.epptr;
     ret = (int) call_func1(p_streambuf_sync, &sb3);
     ok(ret == 0, "sync failed, expected 0 got %d\n", ret);




More information about the wine-cvs mailing list