diff --git a/src/plugins/type/README.md b/src/plugins/type/README.md index 793b842cd28..6f91009907a 100644 --- a/src/plugins/type/README.md +++ b/src/plugins/type/README.md @@ -20,7 +20,7 @@ The type checker plugin supports these types: `any`, `enum`, `string`, `wstring` and `octet`. - Checking `any` will always be successful, regardless of the content. -- `string` matches any non-empty key value. +- `string` matches any string key value. - `octet` and `char` are equivalent to each other. - `enum` will do enum checking as described below. - `boolean` only allows the values `1` and `0`. See also [Normalization](#normalization). diff --git a/src/plugins/type/types.c b/src/plugins/type/types.c index f253a38f804..82e7961a2cc 100644 --- a/src/plugins/type/types.c +++ b/src/plugins/type/types.c @@ -58,7 +58,7 @@ bool elektraTypeCheckWChar (const Key * key) bool elektraTypeCheckString (const Key * key) { - return strlen (keyString (key)) != 0; + return keyIsString (key) == 1; } bool elektraTypeCheckWString (const Key * key)