fix crash when spaces are in puzzle pack name
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package;
|
||||
|
||||
using StringTools;
|
||||
import flash.display.BitmapData;
|
||||
import haxe.io.Path;
|
||||
import flixel.FlxG;
|
||||
|
@@ -249,9 +249,14 @@
|
||||
FlxColor.GRAY
|
||||
])
|
||||
|
||||
(function nameForSave [:String name]
|
||||
(doFor forbiddenChar (.split #"~%&\;:"',<>?# "# "")
|
||||
(set name (name.replace forbiddenChar "")))
|
||||
name)
|
||||
|
||||
(method makeRewardSprites [m p currentRewardFile]
|
||||
(set save (new FlxSave))
|
||||
(save.bind currentRewardFile.path)
|
||||
(assert (save.bind (nameForSave currentRewardFile.path)) "failed to bind save data")
|
||||
(unless save.data.storedPositions
|
||||
(set save.data.storedPositions (new Map<Int,FlxPoint>)))
|
||||
(unless save.data.storedAngles
|
||||
|
Reference in New Issue
Block a user