Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
luoganda is currently offline  luoganda
Messages: 195
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
 
Read Message
Read Message
Previous Topic: [BUG #1855, + PATCH] FormatIntAlpha oes not always give the right results.
Next Topic: Returning Tuple that contains Vector is not possible
Goto Forum:
  


Current Time: Fri Apr 26 12:09:49 CEST 2024

Total time taken to generate the page: 5.93271 seconds