Home » U++ Library support » U++ Library : Other (not classified elsewhere) » ConvertString and maxlen
ConvertString and maxlen [message #9410] |
Sun, 06 May 2007 09:23  |
|
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));
}
|
|
|
Goto Forum:
Current Time: Thu May 01 15:51:06 CEST 2025
Total time taken to generate the page: 0.02708 seconds
|