don't truncate the version when it doesn't contain a string, fixes #1711, thanks Peorth Yggdrasil

git-svn-id: file:///home/svn/framework3/trunk@9104 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-04-19 22:12:35 +00:00
parent 6d788a9437
commit 8919688e1a
1 changed files with 4 additions and 2 deletions

View File

@ -636,8 +636,10 @@ function searchVersion(needle, haystack) {
var found_version;
if (index == -1) { return; }
found_version = haystack.substring(index+needle.length+1);
// Strip off any junk at the end such as a CLR declaration
found_version = found_version.substring(0,found_version.indexOf(' '));
if (found_version.indexOf(' ') != -1) {
// Strip off any junk at the end such as a CLR declaration
found_version = found_version.substring(0,found_version.indexOf(' '));
}
return found_version;
}