Home » U++ Library support » U++ Core » simple bug? passing String::GetVoid() to StringStream
simple bug? passing String::GetVoid() to StringStream [message #49770] |
Sat, 28 April 2018 12:06  |
luoganda
Messages: 214 Registered: November 2016
|
Experienced Member |
|
|
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
|
|
|
Goto Forum:
Current Time: Thu May 15 10:49:54 CEST 2025
Total time taken to generate the page: 0.02254 seconds
|