Added character string helper to test for printable. Added to WP checks.

This commit is contained in:
skarg
2010-12-02 19:33:22 +00:00
parent f26997a367
commit e850469da8
3 changed files with 43 additions and 0 deletions
+5
View File
@@ -177,6 +177,11 @@ bool WPValidateString(
(characterstring_length(&pValue->type.Character_String) ==
0)) {
*pErrorCode = ERROR_CODE_VALUE_OUT_OF_RANGE;
} else if ((bEmptyAllowed == false) &&
(!characterstring_printable(
&pValue->type.Character_String))) {
/* assumption: non-empty also means must be "printable" */
*pErrorCode = ERROR_CODE_VALUE_OUT_OF_RANGE;
} else if (characterstring_length(&pValue->
type.Character_String) >= iMaxLen) {
*pErrorClass = ERROR_CLASS_RESOURCES;