StringStream ss(LoadFile(fname));if(ss.IsError()){errline("Can't load file %s",~fname);return false;}
is this a bug? if is, this is for any Stream based class
If fname does not exist(down code), LoadFile ret String::GetVoid(), then pass this to StringStream constructor,
but ss.IsError() and ss.IsOpen doesn't react on it(doesn't take into consideration that String::GetVoid() was passed.
StringStream ss(LoadFile(fname));if(ss.IsError()){errline("Can't load file %s",~fname);return false;}
Of course, this can easily be solved by checking if FileExists before passing it to StringStream
String data = LoadFile(fname); if(data.IsVoid()) { errline("..."); return false; } StringString ss(data);