Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Mosier <smosier@microsoft.com>2015-11-21 00:16:06 +0300
committerScott Mosier <smosier@microsoft.com>2015-11-21 00:16:06 +0300
commita64c7a7843de38fac7434f1a9ee59ece9f4bdc3a (patch)
treef18fbba24788552b36605c59c7de1490d1b34ada /src/Native/Runtime/RhConfig.cpp
parent06f392fc679ec96da9ee8f2332abce56a54bb304 (diff)
Fix runtime assert default behavior
Change the default to be console-oriented. This is better for unattended test passes because it now prints to the console instead of popping up a dialog box. You can get back to the old behavior by setting RH_BreakOnAssert=0 in the environment or config file.
Diffstat (limited to 'src/Native/Runtime/RhConfig.cpp')
-rw-r--r--src/Native/Runtime/RhConfig.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Native/Runtime/RhConfig.cpp b/src/Native/Runtime/RhConfig.cpp
index 6239f90f8..2467e301c 100644
--- a/src/Native/Runtime/RhConfig.cpp
+++ b/src/Native/Runtime/RhConfig.cpp
@@ -27,7 +27,7 @@
#include <string.h>
-UInt32 RhConfig::ReadConfigValue(_In_z_ const WCHAR *wszName)
+UInt32 RhConfig::ReadConfigValue(_In_z_ const WCHAR *wszName, UInt32 uiDefaultValue)
{
WCHAR wszBuffer[CONFIG_VAL_MAXLEN + 1]; // 8 hex digits plus a nul terminator.
const UInt32 cchBuffer = sizeof(wszBuffer) / sizeof(wszBuffer[0]);
@@ -43,7 +43,7 @@ UInt32 RhConfig::ReadConfigValue(_In_z_ const WCHAR *wszName)
cchResult = GetIniVariable(wszName, wszBuffer, cchBuffer);
if ((cchResult == 0) || (cchResult >= cchBuffer))
- return 0;
+ return uiDefaultValue; // not found, return default
UInt32 uiResult = 0;
@@ -59,7 +59,7 @@ UInt32 RhConfig::ReadConfigValue(_In_z_ const WCHAR *wszName)
else if ((ch >= L'A') && (ch <= L'F'))
uiResult += (ch - L'A') + 10;
else
- return 0;
+ return uiDefaultValue; // parse error, return default
}
return uiResult;