Fix #6898: Replace atoi() with strtoul()

Normalize type and parsing of generation_seed across all files
Add assert_compile() to ensure correct type
This commit is contained in:
Miguel Horta
2018-10-11 00:33:37 +01:00
committed by Owen Rudge
parent fbfa4eb592
commit e00908f5e9
3 changed files with 7 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ enum LandscapeGenerator {
LG_TERRAGENESIS = 1, ///< TerraGenesis Perlin landscape generator
};
static const uint GENERATE_NEW_SEED = UINT_MAX; ///< Create a new random seed
static const uint32 GENERATE_NEW_SEED = UINT32_MAX; ///< Create a new random seed
/** Modes for GenerateWorld */
enum GenWorldMode {
@@ -97,7 +97,7 @@ void SetGeneratingWorldProgress(GenWorldProgress cls, uint total);
void IncreaseGeneratingWorldProgress(GenWorldProgress cls);
void PrepareGenerateWorldProgress();
void ShowGenerateWorldProgress();
void StartNewGameWithoutGUI(uint seed);
void StartNewGameWithoutGUI(uint32 seed);
void ShowCreateScenario();
void StartScenarioEditor();