diff -r 818fe0ed324b -r e3ee96a3961c imgtools/romtools/rombuild/rombuild.cpp --- 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());