Forum Moderator Gurgarath 2511 Posted June 21, 2022 Forum Moderator Share Posted June 21, 2022 (edited) Hello, As a certain someone pointed out with pseudo code, a new fix has made its way onto the official binaries. This fix is really small and specific as it would almost never be triggered, unless you specifically trigger it yourself. How to reproduce? Basically, edit the file metin2.cfg and replace the resolution (WIDTH / HEIGHT) with those three lines. WIDTH 32767 HEIGHT 32767 WINDOWED 0 Unless you have a very unusual and gigantic screen and resolution, it will basically crash, saying that your game doesn't support DirectX, stuff like that. How to fix? Spoiler This is the hidden content, please Sign In or Sign Up Edit: Additional fix for overflow and negatives values here: Have a nice day! Edited June 23, 2022 by Gurgarath 120 2 2 2 1 1 29 7 51 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Lead0b110010100 15 Posted June 23, 2022 Share Posted June 23, 2022 But... why should someone do that xDD And why should a server admin care hahahha 2 1 1 Link to comment Share on other sites More sharing options...
Premium Syreldar 1873 Posted June 23, 2022 Premium Share Posted June 23, 2022 1 hour ago, Lead0b110010100 said: But... why should someone do that xDD And why should a server admin care hahahha ..No matter how useless it is. It's still a shared free fix, why comment like that? 3 1 2 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2511 Posted June 23, 2022 Author Forum Moderator Share Posted June 23, 2022 3 hours ago, Lead0b110010100 said: But... why should someone do that xDD And why should a server admin care hahahha That's a reversed fix. Most likely they fixed it because they got aware of this and decided to fix it. Of course it is very rare, I didn't even know you could abuse it in fullscreen before "reading" the assembly. I would say any server adming caring about things like this and details is a good admin, but that's my two cents on the question. It's a small and free fix anyway, you're free to use it or not 1 6 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Lead0b110010100 15 Posted June 23, 2022 Share Posted June 23, 2022 2 hours ago, Gurgarath said: That's a reversed fix. Most likely they fixed it because they got aware of this and decided to fix it. Of course it is very rare, I didn't even know you could abuse it in fullscreen before "reading" the assembly. I would say any server adming caring about things like this and details is a good admin, but that's my two cents on the question. It's a small and free fix anyway, you're free to use it or not Oh wow, my comment got more backlash than I thought it would. I was like "Why should someone put such a crazy value there, that's stupid as hell. But someone did, so did you find a fix for it." The problem we are trying to solve here is not a new one, try entering 9000000000 as a value for the width parameter for example. It will also overflow, resulting in a 'random' value of m_Config.width or a crash. We can't really 'fix' the underlying problem here, which is that serialization of numbers can result in overflows. If you take a 8 bit data type like 'long long' instead of the 4 bit 'int' for m_Config.width, someone could still write a bigger number. What I wan't to say is: This check might result in randomly true or false, regarding the value after the overflow in the config parameter. if (m_Config.width >= screen_width_1) Sorry if my first comment sounded rude or offensive, it was definitely not meant like that. 2 Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2511 Posted June 23, 2022 Author Forum Moderator Share Posted June 23, 2022 (edited) 4 hours ago, Lead0b110010100 said: Oh wow, my comment got more backlash than I thought it would. I was like "Why should someone put such a crazy value there, that's stupid as hell. But someone did, so did you find a fix for it." The problem we are trying to solve here is not a new one, try entering 9000000000 as a value for the width parameter for example. It will also overflow, resulting in a 'random' value of m_Config.width or a crash. We can't really 'fix' the underlying problem here, which is that serialization of numbers can result in overflows. If you take a 8 bit data type like 'long long' instead of the 4 bit 'int' for m_Config.width, someone could still write a bigger number. What I wan't to say is: This check might result in randomly true or false, regarding the value after the overflow in the config parameter. if (m_Config.width >= screen_width_1) Sorry if my first comment sounded rude or offensive, it was definitely not meant like that. Don't worry, mine wasn't supposed to sound harsh as well. It's just funny because this kind of comment is a bit of a meme on the community. However, regarding your message I wasn't able to reproduce it at all. I however managed to trigger the bug by putting negative value. Here is the proper fix for both, I included the theoric fix about what you said, you can "merge" the fixes to make it look more compact but for learning purposes I made it longer. The bug still occured (so still occurs on official binaries) if you add a negative value in fullscreen mode. Which doesn't occur in Windowed mode. Spoiler This is the hidden content, please Sign In or Sign Up Edited June 23, 2022 by Gurgarath 35 1 7 6 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Active Member Thorek 280 Posted June 24, 2022 Active Member Share Posted June 24, 2022 (edited) const uint32_t width = m_Config.bWindowed ? GetSystemMetrics(SM_CXFULLSCREEN) : GetSystemMetrics(SM_CXSCREEN); const uint32_t height = m_Config.bWindowed ? GetSystemMetrics(SM_CYFULLSCREEN) : GetSystemMetrics(SM_CYSCREEN); if (m_Config.width >= width) m_Config.width = width; if (m_Config.height >= height) m_Config.height = height; This version looks better imho. Edited April 27, 2023 by Thorek 3 2 2 Link to comment Share on other sites More sharing options...
Recommended Posts