src/genworld_gui.cpp
changeset 9516 a67367fc0a74
parent 9413 7042a8ec3fa8
child 9605 5a1897abd925
equal deleted inserted replaced
9515:ff5c2a07215b 9516:a67367fc0a74
   475 		/* the seed is unsigned, therefore atoi cannot be used.
   475 		/* the seed is unsigned, therefore atoi cannot be used.
   476 			* As 2^32 - 1 (MAX_UVALUE(uint32)) is a 'magic' value
   476 			* As 2^32 - 1 (MAX_UVALUE(uint32)) is a 'magic' value
   477 			* (use random seed) it should not be possible to be
   477 			* (use random seed) it should not be possible to be
   478 			* entered into the input field; the generate seed
   478 			* entered into the input field; the generate seed
   479 			* button can be used instead. */
   479 			* button can be used instead. */
   480 		_settings_newgame.game_creation.generation_seed = minu(strtoul(this->edit_str_buf, NULL, sizeof(this->edit_str_buf) - 1), MAX_UVALUE(uint32) - 1);
   480 		_settings_newgame.game_creation.generation_seed = minu(strtoul(this->edit_str_buf, NULL, 10), MAX_UVALUE(uint32) - 1);
   481 		return state;
   481 		return state;
   482 	}
   482 	}
   483 
   483 
   484 	virtual void OnDropdownSelect(int widget, int index)
   484 	virtual void OnDropdownSelect(int widget, int index)
   485 	{
   485 	{