mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Fix settings to honor numeric conversion errors
Rename try* non exceptioning functions to *NoEx
This commit is contained in:
@@ -1671,9 +1671,10 @@ int main(int argc, char *argv[])
|
||||
//infostream<<"Main: password hash: '"<<password<<"'"<<std::endl;
|
||||
|
||||
address = menudata.address;
|
||||
int newport = stoi(menudata.port);
|
||||
if(newport != 0)
|
||||
port = newport;
|
||||
try {
|
||||
port = stoi(menudata.port);
|
||||
}
|
||||
catch (NumericException&e) {}
|
||||
|
||||
simple_singleplayer_mode = menudata.simple_singleplayer_mode;
|
||||
|
||||
|
Reference in New Issue
Block a user