Skip to content

Commit

Permalink
fix string overflow or truncation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
brunotl committed Nov 22, 2023
1 parent 7a2ffb1 commit 0f2968c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Common/Source/SaveLoadTask/LoadCupTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,9 @@ TCHAR szString[READLINE_LENGTH + 1];
TCHAR file_name[180];
const TCHAR * pToken = lk::tokenizer<TCHAR>(szTaskStrings[TaskIndex]).Next({_T(',')});
if((pToken) && (_tcslen (pToken)>1)) {
_sntprintf(file_name,180, TEXT("%s %s ?"), MsgToken<891>(), pToken ); // Clear old task and load taskname
lk::snprintf(file_name, _T("%s %s ?"), MsgToken<891>(), pToken); // Clear old task and load taskname
} else {
_sntprintf(file_name,180, TEXT("%s %s ?"), MsgToken<891>(), MsgToken<907>()); // Clear old task and load task
lk::snprintf(file_name, _T("%s %s ?"), MsgToken<891>(), MsgToken<907>()); // Clear old task and load task
}
if(MessageBoxX(file_name, _T(" "), mbYesNo) == IdYes) {
LoadCupTaskSingle(szFileName,szString, TaskIndex); // load new task
Expand Down

0 comments on commit 0f2968c

Please sign in to comment.