summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/string.c b/string.c
index ee5f1152e..18428527d 100644
--- a/string.c
+++ b/string.c
@@ -57,3 +57,9 @@ char* CDECL str_fmt(const char* str, ...)
if (p != NULL) memcpy(p, buf, len + 1);
return p;
}
+
+void str_validate(char *str)
+{
+ for (; *str != '\0'; str++)
+ if (!IsValidAsciiChar(*str)) *str = '?';
+}