Improved search for assembly when opening Package associated with *.upp file.

git-svn-id: svn://ultimatepp.org/upp/trunk@7955 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
andreincx 2014-12-08 22:39:43 +00:00
parent 1232c7a5d5
commit 511399d07f

View file

@ -966,9 +966,10 @@ void AppMain___()
if(arg.GetCount() == 1) {
if(arg[0].EndsWith(".upp")) {
Vector<String> names = Split(arg[0], DIR_SEP);
for(int i = 0, count = names.GetCount(); i < count; ++i) {
int last = names.GetCount() - 1;
for(int i = last; i >= 0; --i) {
if (IsAssembly(names[i])) {
String package = names[count - 1];
String package = names[last];
package.Remove(package.GetCount() - 4, 4);
LoadVars(names[i]);
ide.SetMain(package);