[corlib] Fixed MonoIO.Write loop.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Thu, 25 Feb 2016 18:44:08 +0000 (18:44 +0000)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Thu, 25 Feb 2016 18:47:22 +0000 (18:47 +0000)
mcs/class/corlib/System.IO/FileStream.cs

index 42a3984b11d2261adaef4c71aff20ccb7fa47de2..0e20810547c0d9e635daa6c428388aed0d86b138 100644 (file)
@@ -1044,7 +1044,7 @@ namespace System.IO
                                        int wcount = buf_length;
                                        int offset = 0;
                                        while (wcount > 0){
-                                               int n = MonoIO.Write (safeHandle, buf, 0, buf_length, out error);
+                                               int n = MonoIO.Write (safeHandle, buf, offset, buf_length, out error);
                                                if (error != MonoIOError.ERROR_SUCCESS) {
                                                        // don't leak the path information for isolated storage
                                                        throw MonoIO.GetException (GetSecureFileName (name), error);