Skip to content

Commit

Permalink
Fix regression in Xaml apps (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Jan 17, 2020
1 parent 662ef58 commit f17f955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions strings/base_extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ extern "C"
int32_t __stdcall WINRT_IMPL_SetThreadpoolThreadMinimum(winrt::impl::ptp_pool pool, uint32_t value) noexcept;
void __stdcall WINRT_IMPL_CloseThreadpool(winrt::impl::ptp_pool pool) noexcept;

int32_t __stdcall WINRT_IMPL_CanUnloadNow() noexcept;
int32_t __stdcall WINRT_IMPL_GetActivationFactory(void* classId, void** factory) noexcept;
int32_t __stdcall WINRT_CanUnloadNow() noexcept;
int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noexcept;
}

#ifdef _M_HYBRID
Expand Down
2 changes: 1 addition & 1 deletion strings/base_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace winrt::impl
inline shared_hstring_header* precreate_hstring_on_heap(uint32_t length)
{
WINRT_ASSERT(length != 0);
uint64_t bytes_required = sizeof(shared_hstring_header) + sizeof(wchar_t) * length;
uint64_t bytes_required = static_cast<uint64_t>(sizeof(shared_hstring_header)) + static_cast<uint64_t>(sizeof(wchar_t)) * static_cast<uint64_t>(length);

if (bytes_required > UINT_MAX)
{
Expand Down

0 comments on commit f17f955

Please sign in to comment.