mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
DRAGONS: Don't use unsafe sprintf and vsprintf
This commit is contained in:
parent
29dea747a8
commit
fcda5809b8
@ -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];
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user