mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Get rid of some fixed-size char buffers
This commit is contained in:
@@ -462,10 +462,9 @@ static void readAssertion(
|
||||
uint32_t i,
|
||||
std::vector<FileStackNode> const &fileNodes
|
||||
) {
|
||||
char assertName[sizeof("Assertion #4294967295")]; // UINT32_MAX
|
||||
|
||||
snprintf(assertName, sizeof(assertName), "Assertion #%" PRIu32, i);
|
||||
std::string assertName("Assertion #");
|
||||
|
||||
assertName += std::to_string(i);
|
||||
readPatch(file, assert.patch, fileName, assertName, 0, fileNodes);
|
||||
tryReadstring(assert.message, file, "%s: Cannot read assertion's message: %s", fileName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user