Fix MouseCursor to MouseCursorShape conversion in ScreenCapturerWin.

BUG=crbug.com/322596
R=dcaiafa@chromium.org, wez@chromium.org

Review URL: https://webrtc-codereview.appspot.com/4279005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5165 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/desktop_capture/screen_capturer_win.cc b/webrtc/modules/desktop_capture/screen_capturer_win.cc
index 42a7192..a9bcd48 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_win.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_win.cc
@@ -337,10 +337,13 @@
   scoped_ptr<MouseCursorShape> cursor(new MouseCursorShape);
   cursor->hotspot = cursor_image->hotspot();
   cursor->size = cursor_image->image().size();
-  cursor->data.assign(
-    cursor_image->image().data(),
-    cursor_image->image().data() +
-        cursor_image->image().stride() * DesktopFrame::kBytesPerPixel);
+  uint8_t* current_row = cursor_image->image().data();
+  for (int y = 0; y < cursor_image->image().size().height(); ++y) {
+    cursor->data.append(current_row,
+                        current_row + cursor_image->image().size().width() *
+                                        DesktopFrame::kBytesPerPixel);
+    current_row += cursor_image->image().stride();
+  }
 
   // Compare the current cursor with the last one we sent to the client. If
   // they're the same, then don't bother sending the cursor again.