Say what is true for a TLV too, and cover the to half of the check
Mirror / push (push) Successful in 5s
Test / lint (pull_request) Successful in 21s
Test / test (18) (pull_request) Successful in 30s
Test / test (20) (pull_request) Successful in 29s
Test / test (22) (pull_request) Successful in 31s
Test / test (24) (pull_request) Successful in 29s
Test / test (26) (pull_request) Successful in 30s

This commit is contained in:
2026-09-21 08:20:59 +02:00
parent dc690b912f
commit a7eb4923f5
5 changed files with 38 additions and 35 deletions
+2 -4
View File
@@ -96,7 +96,7 @@ function pastLatin1(text: string): { err: Error } | undefined {
function wantText(value: ParamValue): Result<{ text: string }> {
if (typeof value !== 'number' && typeof value !== 'string') {
return { err: new Error(`Expected a string, got ${typeof value}`) };
return { err: new Error(`Expected a string or a number, got ${typeof value}`) };
}
const text = String(value);
@@ -114,9 +114,7 @@ function wantCstringText(value: ParamValue): Result<{ text: string }> {
if (index === -1) return { text };
return {
err: new Error(
`U+0000 at index ${String(index)} would end the C-Octet String there, so the peer would read every field behind it shifted`,
),
err: new Error(`U+0000 at index ${String(index)} would end the C-Octet String there`),
};
}