imgtools/romtools/rombuild/rombuild.cpp
changeset 698 e3ee96a3961c
parent 694 c3fbb20e86f0
child 700 c22eff170fac
--- a/imgtools/romtools/rombuild/rombuild.cpp	Thu Nov 18 16:02:32 2010 +0800
+++ b/imgtools/romtools/rombuild/rombuild.cpp	Fri Nov 19 13:37:08 2010 +0800
@@ -490,7 +490,7 @@
 		}
 		return 0;
 	}
-	if (romlogfile[romlogfile.size()-1] == '\\' || romlogfile[romlogfile.size()-1] == '/')
+	if (romlogfile.empty() || romlogfile[romlogfile.size()-1] == '\\' || romlogfile[romlogfile.size()-1] == '/')
 		romlogfile += "ROMBUILD.LOG";
  	H.SetLogFile(romlogfile.c_str());
 	ObeyFileReader *reader=new ObeyFileReader(filename.c_str());