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++ Library : Other (not classified elsewhere) » Util.cpp static sIniFile BUG FIX
Util.cpp static sIniFile BUG FIX [message #23856] Fri, 27 November 2009 09:52 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi there

in Core/Util.cpp:390
String GetIniKey(const char *id, const String& def)

..
key = LoadIniFile(sIniFile ? sIniFile : ~ConfigFile("q.ini"));
..

should be changed to something like

...
key = LoadIniFile(!(String() = sIniFile).IsEmpty() ? sIniFile : ~ConfigFile("q.ini"));
...

since the sIniFile is a
static char sIniFile[256];

and the compare yields always true, where the logic should be "if sIniFile has conent, use sIniFile", right?

Re: Util.cpp static sIniFile BUG FIX [message #23866 is a reply to message #23856] Fri, 27 November 2009 23:00 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Fri, 27 November 2009 03:52

hi there

in Core/Util.cpp:390
String GetIniKey(const char *id, const String& def)

..
key = LoadIniFile(sIniFile ? sIniFile : ~ConfigFile("q.ini"));
..

should be changed to something like

...
key = LoadIniFile(!(String() = sIniFile).IsEmpty() ? sIniFile : ~ConfigFile("q.ini"));
...

since the sIniFile is a
static char sIniFile[256];

and the compare yields always true, where the logic should be "if sIniFile has conent, use sIniFile", right?




Thanks, accidentally, I have already fixed this bug while finding it hard way - my major project updating got broken... Smile

Mirek
Previous Topic: Painter DrawLine proposal
Next Topic: Painter DrawLineStroke proposal
Goto Forum:
  


Current Time: Fri Apr 19 02:57:32 CEST 2024

Total time taken to generate the page: 0.02288 seconds