mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch to fix cost computation in MSI for large values.
This commit is contained in:
parent
4b0fe0c820
commit
b2098faef8
@ -0,0 +1,33 @@
|
||||
From 8570cb45ae2a6e39df2fe1d9642fb4d987d6b2e0 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Jansen <learn0more+wine@gmail.com>
|
||||
Date: Fri, 13 Jan 2017 23:20:52 +0100
|
||||
Subject: msi: Do not sign extend after multiplying.
|
||||
|
||||
Signed-off-by: Mark Jansen <learn0more+wine@gmail.com>
|
||||
---
|
||||
dlls/msi/dialog.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
|
||||
index fc9c24c90a3..d9a2ab7a614 100644
|
||||
--- a/dlls/msi/dialog.c
|
||||
+++ b/dlls/msi/dialog.c
|
||||
@@ -3184,13 +3184,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;
|
||||
--
|
||||
2.11.0
|
||||
|
@ -204,6 +204,7 @@ patch_enable_all ()
|
||||
enable_mpr_WNetGetUniversalNameW="$1"
|
||||
enable_mscoree_CorValidateImage="$1"
|
||||
enable_mshtml_HTMLLocation_put_hash="$1"
|
||||
enable_msi_msi_vcl_get_cost="$1"
|
||||
enable_msidb_Implementation="$1"
|
||||
enable_msvcr120__SetWinRTOutOfMemoryExceptionCallback="$1"
|
||||
enable_msvcrt_Math_Precision="$1"
|
||||
@ -810,6 +811,9 @@ patch_enable ()
|
||||
mshtml-HTMLLocation_put_hash)
|
||||
enable_mshtml_HTMLLocation_put_hash="$2"
|
||||
;;
|
||||
msi-msi_vcl_get_cost)
|
||||
enable_msi_msi_vcl_get_cost="$2"
|
||||
;;
|
||||
msidb-Implementation)
|
||||
enable_msidb_Implementation="$2"
|
||||
;;
|
||||
@ -4962,6 +4966,18 @@ if test "$enable_mshtml_HTMLLocation_put_hash" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset msi-msi_vcl_get_cost
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/msi/dialog.c
|
||||
# |
|
||||
if test "$enable_msi_msi_vcl_get_cost" -eq 1; then
|
||||
patch_apply msi-msi_vcl_get_cost/0001-msi-Do-not-sign-extend-after-multiplying.patch
|
||||
(
|
||||
echo '+ { "Mark Jansen", "msi: Do not sign extend after multiplying.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset msidb-Implementation
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
Reference in New Issue
Block a user