Kaydet (Commit) d08735a5 authored tarafından Guido van Rossum's avatar Guido van Rossum

Skip empty paths read from the registry.

üst 9c6ba5e9
...@@ -89,12 +89,14 @@ getpythonregpath(HKEY keyBase, BOOL bWin32s) ...@@ -89,12 +89,14 @@ getpythonregpath(HKEY keyBase, BOOL bWin32s)
if (rc) break; if (rc) break;
rc = RegQueryValue(newKey, keyBuf, dataBuf+off, &reqdSize); rc = RegQueryValue(newKey, keyBuf, dataBuf+off, &reqdSize);
if (rc) break; if (rc) break;
adjust = strlen(dataBuf+off); if (reqdSize>1) { // If Nothing, or only '\0' copied.
dataSize -= adjust; adjust = strlen(dataBuf+off);
off += adjust; dataSize -= adjust;
dataBuf[off++] = ';'; off += adjust;
dataBuf[off] = '\0'; dataBuf[off++] = ';';
dataSize--; dataBuf[off] = '\0';
dataSize--;
}
} }
/* Additionally, win32s doesnt work as expected, so /* Additionally, win32s doesnt work as expected, so
the specific strlen() is required for 3.1. */ the specific strlen() is required for 3.1. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment