|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002178||FSSCP||gameplay||public||2010-04-09 15:04||2010-04-18 23:48|
|Product Version||3.6.12 RC1|
|Target Version||Fixed in Version||3.6.12|
|Summary||0002178: Assert in missiontraining.cpp, line 924 for empty training messages|
|Description||To work around the "only one sound may be played via play-sound-from-file" rule, General Battuta used empty training messages.|
However, these cause asserts on debug builds, which I believe are caused by a faulty check.
The assertion reads:
"Assert(Training_num_lines > 0);"
Training_num_lines is determined by running the message that is to be sent through split_str, which may return 0 on empty messages (that is, messages consisting entirely of whitespace).
Changing the check to Assert(Training_num_lines >= 0) fixes this.
|Tags||No tags attached.|
|Attached a fix. It moves the Assert to the location that the split_str is actually called. Also, moves the number of lines guard to before the number of lines is used for anything.|
|Patch added in revision 6062.|
|2010-04-09 15:04||The_E||New Issue|
|2010-04-18 13:33||iss_mneur||File Added: 2178_patch.patch|
|2010-04-18 13:43||iss_mneur||Note Added: 0011888|
|2010-04-18 23:48||Goober5000||Note Added: 0011891|
|2010-04-18 23:48||Goober5000||Assigned To||=> iss_mneur|
|2010-04-18 23:48||Goober5000||Status||new => resolved|
|2010-04-18 23:48||Goober5000||Resolution||open => fixed|
|2010-04-18 23:48||Goober5000||Fixed in Version||=> 3.6.12|