Minor fix to game load code.
[super-star-trek.git] / sst.py
diff --git a/sst.py b/sst.py
index e140f259a97cb64e1041c515e5010a49df41f352..691eff84dbb4e2f179528a3ecbce5becc9cc9795 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -5203,7 +5203,6 @@ def freeze(boss):
     if key != "IHALPHA":
         huh()
         return
-    scanner.chew()
     if '.' not in scanner.token:
         scanner.token += ".trk"
     try:
@@ -5213,11 +5212,12 @@ def freeze(boss):
        return
     cPickle.dump(game, fp)
     fp.close()
+    scanner.chew()
 
 def thaw():
     "Retrieve saved game."
     global game
-    game.passwd[0] = '\0'
+    game.passwd = None
     key = scanner.next()
     if key == "IHEOL":
        proutn(_("File name: "))
@@ -5225,7 +5225,6 @@ def thaw():
     if key != "IHALPHA":
        huh()
        return True
-    scanner.chew()
     if '.' not in scanner.token:
         scanner.token += ".trk"
     try:
@@ -5235,6 +5234,7 @@ def thaw():
        return
     game = cPickle.load(fp)
     fp.close()
+    scanner.chew()
     return False
 
 # I used <http://www.memory-alpha.org> to find planets