online multiplayer chess game (note server currently down)
fix edge case crash
| -rw-r--r-- | Utils.gd | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -93,7 +93,7 @@ func fen() -> String: var spot = Globals.grid.matrix[rank][file] if spot == null: empty += 1 - if str(empty - 1) == pieces[-1]: + if pieces.size() > 0 and str(empty - 1) == pieces[-1]: pieces[-1] = str(empty) else: pieces += str(empty) |