WIXBUG:4716 #243

Merged
merged 1 commit into from May 24, 2015

Projects

None yet

3 participants

@barnson
Member
barnson commented May 4, 2015

If a .wxl file is missing strings added in v3.10, duplicate the generic string from v3.9. Add support for doing so to locutil.

@rseanhall rseanhall commented on an outdated diff May 19, 2015
src/libs/dutil/locutil.cpp
@@ -286,6 +286,33 @@ extern "C" HRESULT DAPI LocGetString(
return hr;
}
+extern "C" HRESULT DAPI LocAddString(
+ __in WIX_LOCALIZATION* pWixLoc,
+ __in_z LPCWSTR wzId,
+ __in_z LPCWSTR wzLocString,
+ __in BOOL bOverridable
+ )
+{
+ HRESULT hr = S_OK;
+
+ ++pWixLoc->cLocStrings;
+ pWixLoc->rgLocStrings = static_cast<LOC_STRING*>(MemReAlloc(pWixLoc->rgLocStrings, sizeof(LOC_STRING) * pWixLoc->cLocStrings, TRUE));
+ ExitOnNull(pWixLoc->rgLocStrings, hr, E_OUTOFMEMORY, "Failed to reallocate memory for localization strings.");
+
+ LOC_STRING* pLocString = pLocString = pWixLoc->rgLocStrings + (pWixLoc->cLocStrings - 1);
@rseanhall
rseanhall May 19, 2015 Member

pLocString = pLocString? Other than that, looks good.

@barnson barnson If a .wxl file is missing strings added in v3.10, duplicate the gener…
…ic string from v3.9. Add support for doing so to locutil.
1af2877
@robmen robmen merged commit 1af2877 into wixtoolset:develop May 24, 2015
@barnson barnson deleted the barnson:bug4716 branch Sep 6, 2015
@barnson barnson restored the barnson:bug4716 branch Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment