--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7414,7 +7414,7 @@
 
 	case SCI_LINESCROLL:
 		ScrollTo(topLine + lParam);
-		HorizontalScrollTo(xOffset + wParam * vs.spaceWidth);
+		HorizontalScrollTo(xOffset + static_cast<int>(wParam) * vs.spaceWidth);
 		return 1;
 
 	case SCI_SETXOFFSET: