Skip to content

Commit

Permalink
Replace usage of sscanf with strtol to remove cppcheck inline suppres…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
eduar-hte committed Oct 21, 2024
1 parent 1672f38 commit 7ec94ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules_set_properties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void ConfigUnicodeMap::loadConfig(std::string f, double configCodePage,

if (mapping != NULL) {
ucode = strtok_r(mapping, ":", &hmap);
sscanf(ucode, "%x", &code); // cppcheck-suppress invalidScanfArgType_int
sscanf(hmap, "%x", &Map); // cppcheck-suppress invalidScanfArgType_int
code = strtol(ucode, nullptr, 16);
Map = strtol(hmap, nullptr, 16);
if (code >= 0 && code <= 65535) {
driver->m_unicodeMapTable.m_unicodeMapTable->change(code, Map);
}
Expand Down

0 comments on commit 7ec94ef

Please sign in to comment.