Skip to content

Commit 19dd74a

Browse files
committed
Very small debug log cleanup
Fix spelling of `Initialization` in debug log and also mitigate the log complaining about invalid pilot data if it has not loaded an actual campaign yet. Everything works as expected.
1 parent 4bc0a21 commit 19dd74a

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

code/mission/missioncampaign.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class campaign
122122
int num_missions; // number of missions in the campaign
123123
int num_missions_completed; // number of missions in the campaign that have been flown
124124
int current_mission; // the current mission that the player is playing. Only valid during the mission
125-
int next_mission; // number of the next mission to fly when comtinuing the campaign. Always valid
125+
int next_mission; // number of the next mission to fly when continuing the campaign. Always valid
126126
int prev_mission; // mission that we just came from. Always valid
127127
int loop_enabled; // whether mission loop is chosen - true during a loop, false otherwise
128128
int loop_mission; // mission number of misssion loop (if any)

code/pilotfile/csg.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ void pilotfile::csg_read_info()
143143
Campaign.next_mission = cfread_int(cfp);
144144

145145
// check that the next mission won't be greater than the total number of missions
146-
if (Campaign.next_mission >= Campaign.num_missions) {
146+
// though ensure we only flag if campaign exists and has been loaded
147+
if (Campaign.num_missions > 0 && Campaign.next_mission >= Campaign.num_missions) {
147148
Campaign.next_mission = 0; // Prevent trying to load from invalid mission data downstream
148149
m_data_invalid = true; // Causes a warning popup to be displayed
149150
}

code/scripting/scripting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void script_init()
175175
parse_modular_table(NOX("*-sct.tbm"), script_parse_table);
176176
mprintf(("SCRIPTING: Parsing pure Lua scripts\n"));
177177
parse_modular_table(NOX("*-sct.lua"), script_parse_lua_script);
178-
mprintf(("SCRIPTING: Inititialization complete.\n"));
178+
mprintf(("SCRIPTING: Initialization complete.\n"));
179179
}
180180
/*
181181
//WMC - Doesn't work as debug console interferes with any non-alphabetic chars.

0 commit comments

Comments
 (0)