From e9f970efa1564a5de14d3a3c0b4cffce139e12d5 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 23 Oct 2022 15:46:41 +0200 Subject: [PATCH] Support \x00 and \x01 as valid D characters --- src/Tools/cdtypes/src/types/cdstring.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/cdtypes/src/types/cdstring.rs b/src/Tools/cdtypes/src/types/cdstring.rs index 5ee57d54..0f7e8d8a 100644 --- a/src/Tools/cdtypes/src/types/cdstring.rs +++ b/src/Tools/cdtypes/src/types/cdstring.rs @@ -36,7 +36,7 @@ impl CDStringValidator for DStringValidator { for chr in value { let chr = *chr as char; - if !matches!(chr, '0'..='9' | 'A'..='Z' | '_') { + if !matches!(chr, '\x00' | '\x01' | '0'..='9' | 'A'..='Z' | '_') { return Err(Error::GenericError(format!("{} not a valid d-character", chr))); } }