diff --git a/src/interfaces/importhelpers.cpp b/src/interfaces/importhelpers.cpp index fe004e6..d628191 100644 --- a/src/interfaces/importhelpers.cpp +++ b/src/interfaces/importhelpers.cpp @@ -603,12 +603,14 @@ namespace if (!md_get_column_value_as_blob(sourceAssembly, mdtAssembly_PublicKey, &publicKey, &publicKeyLength)) return E_FAIL; + span publicKeyTokenSpan; StrongNameToken publicKeyToken; if (publicKey != nullptr) { assert(IsAfPublicKey(flags)); flags &= ~afPublicKey; RETURN_IF_FAILED(StrongNameTokenFromPublicKey({ publicKey, publicKeyLength }, publicKeyToken)); + publicKeyTokenSpan = { publicKeyToken.data(), publicKeyToken.size() }; } else { @@ -648,7 +650,7 @@ namespace flags, assemblyName, assemblyCulture, - { publicKeyToken.data(), publicKeyToken.size() }, + publicKeyTokenSpan, targetAssembly)); if (hr == S_OK)