https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48d97683b30c0cbaf4c22…
commit 48d97683b30c0cbaf4c229e36c48a69674332526
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Mar 14 21:53:54 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:45 2022 +0100
[WINESYNC] msi: Do not sign extend after multiplying.
Signed-off-by: Mark Jansen <learn0more+wine(a)gmail.com>
wine-staging patch by Mark Jansen <learn0more+wine(a)gmail.com>
---
...-msi__Do_not_sign_extend_after_multiplying.diff | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git
a/sdk/tools/winesync/msi_staging/0001-msi__Do_not_sign_extend_after_multiplying.diff
b/sdk/tools/winesync/msi_staging/0001-msi__Do_not_sign_extend_after_multiplying.diff
new file mode 100644
index 00000000000..6f8e3524a5b
--- /dev/null
+++ b/sdk/tools/winesync/msi_staging/0001-msi__Do_not_sign_extend_after_multiplying.diff
@@ -0,0 +1,26 @@
+diff --git
a/sdk/tools/winesync/msi_staging/0001-msi__Do_not_sign_extend_after_multiplying.diff
b/sdk/tools/winesync/msi_staging/0001-msi__Do_not_sign_extend_after_multiplying.diff
+new file mode 100644
+index 00000000000..307428366a3
+--- /dev/null
++++ b/sdk/tools/winesync/msi_staging/0001-msi__Do_not_sign_extend_after_multiplying.diff
+@@ -0,0 +1,20 @@
++diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c
++index 9d82be8..8e4c151 100644
++--- a/dll/win32/msi/dialog.c
+++++ b/dll/win32/msi/dialog.c
++@@ -3186,13 +3186,13 @@ static LONGLONG msi_vcl_get_cost( msi_dialog *dialog )
++ MSICOSTTREE_SELFONLY, INSTALLSTATE_LOCAL, &each_cost)))
++ {
++ /* each_cost is in 512-byte units */
++- total_cost += each_cost * 512;
+++ total_cost += ((LONGLONG)each_cost) * 512;
++ }
++ if (ERROR_SUCCESS == (MSI_GetFeatureCost(dialog->package, feature,
++ MSICOSTTREE_SELFONLY, INSTALLSTATE_ABSENT, &each_cost)))
++ {
++ /* each_cost is in 512-byte units */
++- total_cost -= each_cost * 512;
+++ total_cost -= ((LONGLONG)each_cost) * 512;
++ }
++ }
++ return total_cost;