[pypy-svn] r33240 - pypy/dist/pypy/translator/cli/src
antocuni at codespeak.net
antocuni at codespeak.net
Thu Oct 12 21:22:40 CEST 2006
Author: antocuni
Date: Thu Oct 12 21:22:39 2006
New Revision: 33240
Modified:
pypy/dist/pypy/translator/cli/src/ll_os.cs
Log:
bugfix
Modified: pypy/dist/pypy/translator/cli/src/ll_os.cs
==============================================================================
--- pypy/dist/pypy/translator/cli/src/ll_os.cs (original)
+++ pypy/dist/pypy/translator/cli/src/ll_os.cs Thu Oct 12 21:22:39 2006
@@ -337,9 +337,14 @@
public static string ll_os_environ(int index)
{
- string key = (string)MyEnviron.GetKey(index);
- string value = (string)MyEnviron.GetByIndex(index);
- return string.Format("{0}={1}", key, value);
+ try {
+ string key = (string)MyEnviron.GetKey(index);
+ string value = (string)MyEnviron.GetByIndex(index);
+ return string.Format("{0}={1}", key, value);
+ }
+ catch(ArgumentOutOfRangeException) {
+ return null;
+ }
}
public static void ll_os_putenv(string s)
More information about the Pypy-commit
mailing list