mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
SAGA2: Fix strlcpy range in document.cpp
This commit is contained in:
parent
81909e6dab
commit
0bdf49fb71
@ -258,7 +258,7 @@ bool CAutoMap::activate(gEventType why) {
|
||||
bool CAutoMap::keyStroke(gPanelMessage &msg) {
|
||||
gEvent ev;
|
||||
switch (msg.key) {
|
||||
case Common::ASCII_ESCAPE:
|
||||
case Common::ASCII_ESCAPE:
|
||||
cmdAutoMapEsc(ev);
|
||||
return true;
|
||||
case Common::KEYCODE_HOME:
|
||||
|
@ -162,13 +162,13 @@ CDocument::CDocument(CDocumentAppearance &dApp,
|
||||
origText = new char[textSize + 1];
|
||||
|
||||
// and fill it
|
||||
Common::strlcpy(origText, buffer, textSize);
|
||||
Common::strlcpy(origText, buffer, textSize + 1);
|
||||
|
||||
// make a working buffer
|
||||
text = new char[textSize + 1];
|
||||
|
||||
// and fill it
|
||||
Common::strlcpy(text, origText, textSize);
|
||||
Common::strlcpy(text, origText, textSize + 1);
|
||||
|
||||
textFont = font;
|
||||
textHeight = (textFont ? textFont->height : 0);
|
||||
@ -465,7 +465,7 @@ bool CDocument::checkForImage(char *string,
|
||||
|
||||
void CDocument::makePages(void) {
|
||||
// copy the original text back to the working buffer
|
||||
Common::strlcpy(text, origText, textSize);
|
||||
Common::strlcpy(text, origText, textSize + 1);
|
||||
|
||||
|
||||
char *str = text;
|
||||
|
Loading…
Reference in New Issue
Block a user