Remove the (R) character from the Windows version string.

This commit is contained in:
Ramon Novoa 2014-09-22 16:53:35 +02:00
parent aafdb46bf6
commit 5306e8dfcf
1 changed files with 16 additions and 2 deletions

View File

@ -372,8 +372,16 @@ Pandora_Wmi::getOSName () {
dhGetValue (L"%s", &name, quickfix,
L".Caption");
ret = name;
dhFreeString (name);
if (name != NULL) {
// Remove the (R) character.
for (int i = 0; i < strlen(name); i++) {
if ((unsigned char)name[i] == 0xAE) {
name[i] = ' ';
}
}
ret = name;
dhFreeString (name);
}
} NEXT_THROW (quickfix);
} catch (string errstr) {
@ -406,6 +414,12 @@ Pandora_Wmi::getOSVersion () {
L".CSDVersion");
if (version != NULL) {
// Remove the (R) character.
for (int i = 0; i < strlen(version); i++) {
if ((unsigned char)version[i] == 0xAE) {
version[i] = ' ';
}
}
ret = version;
dhFreeString (version);
}