Skip to content

Commit

Permalink
Fix character type casting in DeepLTranslator for language conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed Nov 21, 2024
1 parent f42e367 commit c7ae100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/translation/cloud-translation/deepl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ std::string DeepLTranslator::translate(const std::string &text, const std::strin
std::string upperTarget = target_lang;
std::string upperSource = source_lang;
for (char &c : upperTarget)
c = std::toupper(c);
c = (char)std::toupper((int)c);
for (char &c : upperSource)
c = std::toupper(c);
c = (char)std::toupper((int)c);

std::stringstream url;
url << "https://api-free.deepl.com/v2/translate"
Expand Down

0 comments on commit c7ae100

Please sign in to comment.