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) » ConvertString and maxlen
ConvertString and maxlen [message #9410] Sun, 06 May 2007 09:23 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

I think there is a bug in ConvertString implementation. There should be GetLength() <= maxlen instead of < maxlen.
Value ConvertString::Scan(const Value& text) const {
	if(IsError(text)) return text;
	if(IsNull(text)) return notnull ? NotNullError() : Value(text);
	if(text.GetType() == STRING_V && String(text).GetLength() <= maxlen ||
	   text.GetType() == WSTRING_V && WString(text).GetLength() <= maxlen) return text;
	return ErrorValue(UPP::Format(t_("Please enter no more than %d characters."), maxlen));
}
 
Read Message
Read Message
Previous Topic: is there a way to print debug output?
Next Topic: DocEdit MaxChars
Goto Forum:
  


Current Time: Tue Jun 04 00:28:21 CEST 2024

Total time taken to generate the page: 0.01768 seconds