Hans Leidekker : wbemprox: Strip trailing spaces from processor name.
Alexandre Julliard
julliard at winehq.org
Fri Jan 25 16:29:06 CST 2019
Module: wine
Branch: master
Commit: d1f70b17e6e3d8c53be7ca3453719b87b66d7598
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d1f70b17e6e3d8c53be7ca3453719b87b66d7598
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Jan 25 10:44:11 2019 +0100
wbemprox: Strip trailing spaces from processor name.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wbemprox/builtin.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 7893aa1..87cdc0a 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -2907,6 +2907,7 @@ static void get_processor_manufacturer( WCHAR *manufacturer )
static void get_processor_name( WCHAR *name )
{
unsigned int regs[4] = {0, 0, 0, 0};
+ int i;
do_cpuid( 0x80000000, regs );
if (regs[0] >= 0x80000004)
@@ -2918,6 +2919,7 @@ static void get_processor_name( WCHAR *name )
do_cpuid( 0x80000004, regs );
regs_to_str( regs, 16, name + 32 );
}
+ for (i = strlenW(name) - 1; i >= 0 && name[i] == ' '; i--) name[i] = 0;
}
static UINT get_processor_currentclockspeed( UINT index )
{
More information about the wine-cvs
mailing list