Skip to content

Commit

Permalink
Fix Ads locale on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tmancey committed Apr 19, 2019
1 parent effbe59 commit ca4069c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions components/brave_ads/browser/ads_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ void AdsServiceImpl::OnMaybeStartForRegion(
is_supported_region_ = is_supported_region;

if (!is_supported_region_) {
LOG(WARNING) << GetAdsLocale() << " locale does not support Ads";

Shutdown();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion components/brave_ads/browser/locale_helper_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ std::string LocaleHelperWin::GetLocale() const {

wcstombs(locale.get(), locale_name.get(), size);

return std::string(locale.get(), size);
return std::string(locale.get());
}

LocaleHelperWin* LocaleHelperWin::GetInstance() {
Expand Down

0 comments on commit ca4069c

Please sign in to comment.