Skip to content

Commit 66a8511

Browse files
authored
Very small debug log cleanup (#6747)
1 parent 7502cf3 commit 66a8511

4 files changed

Lines changed: 5 additions & 4 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/missionui/missionshipchoice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ void start_ship_animation(int ship_class, int /*play_sound*/)
17471747
// page in ship textures properly (takes care of nondimming pixels)
17481748
model_page_in_textures(ShipSelectModelNum, ship_class);
17491749

1750-
if (sip->model_num < 0) {
1750+
if (ShipSelectModelNum < 0) {
17511751
mprintf(("Couldn't load model file %s in missionshipchoice.cpp\n", sip->pof_file));
17521752
}
17531753
} else {

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)