diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index dd9f438f1..c2c1bad13 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -514,18 +514,15 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum, settings().getString("plusroms.id") == EmptyString) { // Make sure there always is an id - if(settings().getString("plusroms.id") == EmptyString) - { - constexpr int ID_LEN = 32 - 2; // WE prefix added later - const char* HEX_DIGITS = "0123456789ABCDEF"; - char id_chr[ID_LEN] = {0}; + constexpr int ID_LEN = 32; + const char* HEX_DIGITS = "0123456789ABCDEF"; + char id_chr[ID_LEN] = {0}; + Random rnd; - Random rnd; - for(char& c: id_chr) - c = HEX_DIGITS[rnd.next() % 16]; + for(char& c: id_chr) + c = HEX_DIGITS[rnd.next() % 16]; - settings().setValue("plusroms.id", string(id_chr, ID_LEN)); - } + settings().setValue("plusroms.id", string(id_chr, ID_LEN)); myEventHandler->changeStateByEvent(Event::PlusRomsSetupMode); } diff --git a/src/emucore/PlusROM.cxx b/src/emucore/PlusROM.cxx index 030476c90..0e2f16782 100644 --- a/src/emucore/PlusROM.cxx +++ b/src/emucore/PlusROM.cxx @@ -84,7 +84,7 @@ class PlusROMRequest { ostringstream content; content << "agent=Stella; " << "ver=" << STELLA_VERSION << "; " - << "id=WE" << myId.id << "; " + << "id=" << myId.id << "; " << "nick=" << myId.nick; httplib::Client client(myDestination.host);