Commit a96e1cef authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Do not loop if a ProgId's Parent Index it itself.

Add a VersionIndIndex for tracking version independent fields for the ProgIds properly.
parent 20ad4d17
......@@ -4558,9 +4558,11 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row)
}
package->progids[index].CurVerIndex = -1;
package->progids[index].VersionIndIndex = -1;
/* if we have a parent then we may be that parents CurVer */
if (package->progids[index].ParentIndex >= 0)
if (package->progids[index].ParentIndex >= 0 &&
package->progids[index].ParentIndex != index)
{
int pindex = package->progids[index].ParentIndex;
while (package->progids[pindex].ParentIndex>= 0)
......@@ -4569,6 +4571,7 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row)
FIXME("BAD BAD need to determing if we are really the CurVer\n");
package->progids[index].CurVerIndex = pindex;
package->progids[pindex].VersionIndIndex = index;
}
return index;
......@@ -5441,16 +5444,17 @@ static UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
RegCloseKey(hkey3);
if (package->classes[i].ProgIDIndex >= 0 &&
package->progids[package->classes[i].ProgIDIndex].ParentIndex
>= 0)
package->progids[package->classes[i].ProgIDIndex].
VersionIndIndex >= 0)
{
progid = package->progids[package->progids[
package->classes[i].ProgIDIndex].ParentIndex].ProgID;
LPWSTR viprogid = strdupW(package->progids[package->progids[
package->classes[i].ProgIDIndex].VersionIndIndex].
ProgID);
RegCreateKeyW(hkey2,szVIProgID,&hkey3);
RegSetValueExW(hkey3,NULL,0,REG_SZ,(LPVOID)progid,
(strlenW(progid)+1) *sizeof(WCHAR));
RegSetValueExW(hkey3,NULL,0,REG_SZ,(LPVOID)viprogid,
(strlenW(viprogid)+1) *sizeof(WCHAR));
RegCloseKey(hkey3);
HeapFree(GetProcessHeap(), 0, viprogid);
}
}
......
......@@ -147,6 +147,7 @@ typedef struct tagMSIPROGID
/* not in the table, set during installation */
BOOL InstallMe;
INT CurVerIndex;
INT VersionIndIndex;
} MSIPROGID;
typedef struct tagMSIVERB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment