# HG changeset patch # User Thibaut Girka # Date 1292088980 -3600 # Node ID d112357a0ec1bcaa571ebfabf455da4f9b2c5e08 # Parent 4416cfac86aefc648b0efdc458cead0e6aa01b22 Fix a bug with savegames introduced with changeset c7bcc0ec2267. Warning: savegames created since c7bcc0ec2267 are probably corrupted, you may have to start the game over. If you chose not to do so, you should replace all occurrences of 'TextWindow' by 'TextImplWindow', and 'Text Window' by 'TextImpl Window' in your save files. diff --git a/scn2k/scn2k_text.cc b/scn2k/scn2k_text.cc --- a/scn2k/scn2k_text.cc +++ b/scn2k/scn2k_text.cc @@ -301,8 +301,8 @@ void Text::InitWindow(void) { void Text::Save(string& str, bool rollback_save) { char buf[1024]; str = "\n"; - str += "[Text Window]\n"; - sprintf(buf, "TextWindow=%d\n",text_window_number); + str += "[TextImpl Window]\n"; + sprintf(buf, "TextImplWindow=%d\n", text_window_number); str += buf; if (rollback_save) { ++save_selectcount; @@ -399,11 +399,11 @@ void Text::Load(const char* str) { cur_backlog_item.Clear(); drawn_backlog_item.Clear(); - str = strstr(str, "\n[Text Window]\n"); + str = strstr(str, "\n[TextImpl Window]\n"); if (str) { SaveFaceHash face_log; - str += strlen("\n[Text Window]\n"); + str += strlen("\n[TextImpl Window]\n"); const char* strend = str; do { str = strend; @@ -413,7 +413,7 @@ void Text::Load(const char* str) { else strend++; if (str[0] == '[') break; // next section - if (strncmp(str, "TextWindow=",15) == 0) { + if (strncmp(str, "TextImplWindow=",15) == 0) { str += 15; sscanf(str, "%d", &text_window_number); } else if (strncmp(str, "SaveSelectCount=",16) == 0) {