DRAGONS: Don't use unsafe sprintf and vsprintf

This commit is contained in:
Le Philousophe 2022-10-23 15:22:03 +02:00 committed by Eugene Sandulenko
parent 29dea747a8
commit fcda5809b8
2 changed files with 2 additions and 2 deletions

View File

@ -487,7 +487,7 @@ void Scene::drawActorNumber(int16 x, int16 y, uint16 actorId) {
uint16 text[30];
char text8[15];
sprintf(text8, "%d", actorId);
Common::sprintf_s(text8, "%d", actorId);
for (uint i = 0; i < strlen(text8); i++) {
text[i] = text8[i];

View File

@ -58,7 +58,7 @@ bool Talk::loadText(uint32 textIndex, uint16 *textBuffer, uint16 bufferLength) {
uint32 fileNo = (textIndex >> 0xc) & 0xffff;
uint32 fileOffset = textIndex & 0xfff;
sprintf(filename, "drag%04d.txt", fileNo);
Common::sprintf_s(filename, "drag%04d.txt", fileNo);
uint32 size;
byte *data = _bigfileArchive->load(filename, size);
debug(1, "DIALOG: %s, %s, %d", filename, data, fileOffset);