Add checks and error messages for some invalid custom mode data (#1049)

This commit is contained in:
User670
2023-11-17 14:06:30 +08:00
committed by GitHub
parent 529b8d453d
commit 1cd62bb163
5 changed files with 47 additions and 4 deletions

View File

@@ -237,9 +237,12 @@ function scene.keyDown(key)
end
str=str:sub(p+1)
end
local success,F=DATA.pasteBoard(str)
local success,F, flagBoardLineLimit=DATA.pasteBoard(str)
if success then
FIELD[page]=F
if flagBoardLineLimit then
MES.new('warn', text.customDataSingleBoardLineLimit)
end
MES.new('check',text.importSuccess)
else
MES.new('error',text.dataCorrupted)