Sim monte freeze fix. (#451)

* Extended the size of the character array to fully fit the string.

* Changed to sizeof().
This commit is contained in:
Christopher LaChance 2017-07-05 08:51:56 -05:00 committed by GitHub
parent d0b9cda9f2
commit 2a79c4a3cd

View File

@ -15,8 +15,8 @@ int cannon_master_shutdown()
if (answer == 8) {
add_test_result("Sim_Monte Simulation", "MonteCarlo Analysis", "");
} else {
char str[20];
sprintf(str, "Actual runs is %d should be 8\n", answer);
char str[40];
snprintf(str, sizeof(str), "Actual runs is %d, should be 8.\n", answer);
add_test_result("Sim_Monte Simulation", "MonteCarlo Analysis", str);
}
trick_test_add_parent("Sim_Monte Simulation", "MonteCarlo Analysis", "1452306647");