From 3f5c9eb9b42739732d18640e074ca9dee16b6f03 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 27 Apr 2021 18:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=9C=E9=A2=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A7=A3=E6=9E=90=E6=97=B6=E9=94=99=E8=AF=AF=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E6=9C=80=E5=90=8E=E7=9A=84=E7=A9=BA=E7=99=BD=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/data.lua | 1 + parts/scenes/customGame.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/parts/data.lua b/parts/data.lua index d5e37822..641b5ddb 100644 --- a/parts/data.lua +++ b/parts/data.lua @@ -114,6 +114,7 @@ function DATA.pasteBoard(str,page)--Paste [str] data to [page] board local _,__ --Decode + str=str:sub(str:find"%S",str:find".%s-$") _,str=pcall(data.decode,"string","base64",str) if not _ then return end _,str=pcall(data.decompress,"string","zlib",str) diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index d40b3380..c14fc4da 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -82,7 +82,7 @@ function scene.keyDown(key) repeat table.remove(FIELD)until #FIELD==0 FIELD[1]=DATA.newBoard() for i=4,#args do - if not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end + if args[i]:find"%S"and not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end end freshMiniFieldVisible() LOG.print(text.importSuccess,COLOR.G)