1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-19 17:41:33 +00:00

Merge branch 'fixstringformat' into 'master'

Fix string format

See merge request OpenMW/openmw!3408
This commit is contained in:
psi29a 2023-09-09 08:06:38 +00:00
commit 61937e19a9
No known key found for this signature in database

View file

@ -23,7 +23,7 @@ namespace
if (std::modf(arg, &integer) != 0) if (std::modf(arg, &integer) != 0)
throw std::runtime_error( throw std::runtime_error(
Misc::StringUtils::format("bad argument #{} to '{}' (number has no integer representation)", n, name)); Misc::StringUtils::format("bad argument #%i to '%s' (number has no integer representation)", n, name));
return integer; return integer;
} }
@ -102,7 +102,7 @@ namespace LuaUtf8
int64_t codepoint = getInteger(args[i], (i + 1), "char"); int64_t codepoint = getInteger(args[i], (i + 1), "char");
if (codepoint < 0 || codepoint > MAXUTF) if (codepoint < 0 || codepoint > MAXUTF)
throw std::runtime_error( throw std::runtime_error(
Misc::StringUtils::format("bad argument #{} to 'char' (value out of range)", (i + 1))); "bad argument #" + std::to_string(i + 1) + " to 'char' (value out of range)");
result += converter.to_bytes(codepoint); result += converter.to_bytes(codepoint);
} }