From bf55de75c653d733170c4438ea505cf79ad24a56 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Fri, 7 Dec 2012 15:52:01 +0000 Subject: [PATCH] [0.2.x] fixed : script with 1-2-3 name's length cannot be run with !py command without .py extension git-svn-id: https://pykd.svn.codeplex.com/svn@81694 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/win/dbgpath.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pykd/win/dbgpath.cpp b/pykd/win/dbgpath.cpp index f2094b7..94bca90 100644 --- a/pykd/win/dbgpath.cpp +++ b/pykd/win/dbgpath.cpp @@ -23,7 +23,11 @@ DbgPythonPath::DbgPythonPath() bool DbgPythonPath::getFullFileName(const std::string &fileName, std::string &fullFileName) const { - bool fileHasPyExt = fileName.rfind(".py") == fileName.length() - 3; + bool fileHasPyExt = false; + + if ( fileName.length() > 3 ) + fileHasPyExt = fileName.rfind(".py") == fileName.length() - 3; + fullFileName = fileName; if (!fileHasPyExt)