diff options
| author | 2021-05-30 20:37:54 +0100 | |
|---|---|---|
| committer | 2021-05-30 20:37:54 +0100 | |
| commit | 02340285c564a7e82105137192d46d554a6fce3a (patch) | |
| tree | 696d1a6249841de62c3fed70310c2a347fc66732 /src/modules/m_codepage.cpp | |
| parent | Add a workaround for a bug in GitHub Actions. (diff) | |
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/modules/m_codepage.cpp')
| -rw-r--r-- | src/modules/m_codepage.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index a2df8cf7e..74b8f138e 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -270,7 +270,8 @@ class ModuleCodepage final bool front = tag->getBool("front", false); for (unsigned long pos = begin; pos <= end; ++pos) { - switch (newcodepage->AllowCharacter(pos, front)) + // This cast could be unsafe but it's not obvious how to make it safe. + switch (newcodepage->AllowCharacter(static_cast<uint32_t>(pos), front)) { case Codepage::ACR_OKAY: ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Marked %lu (%.4s) as allowed (front: %s)", |
