diff --git a/rehlds/HLTV/Console/build.gradle b/rehlds/HLTV/Console/build.gradle index 755d2c8..5512c56 100644 --- a/rehlds/HLTV/Console/build.gradle +++ b/rehlds/HLTV/Console/build.gradle @@ -65,6 +65,7 @@ void setupToolchain(NativeBinarySpec b) { cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp' } + cfg.linkerOptions.args '-no-pie' cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions' cfg.extraLibs 'dl' } diff --git a/rehlds/common/commandline.cpp b/rehlds/common/commandline.cpp index 1b1a05e..9be292c 100644 --- a/rehlds/common/commandline.cpp +++ b/rehlds/common/commandline.cpp @@ -340,7 +340,8 @@ const char *CCommandLine::CheckParm(const char *psz, char **ppszValue) const if (p2[i] == '\0' || p2[i] == ' ') break; - sz[i++] = p2[i]; + sz[i] = p2[i]; + i++; } while (i < sizeof(sz)); sz[i] = '\0'; diff --git a/rehlds/dedicated/build.gradle b/rehlds/dedicated/build.gradle index 7b3cbba..93c603d 100644 --- a/rehlds/dedicated/build.gradle +++ b/rehlds/dedicated/build.gradle @@ -65,6 +65,7 @@ void setupToolchain(NativeBinarySpec b) { cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp' } + cfg.linkerOptions.args '-no-pie' cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions' cfg.extraLibs 'dl' }