We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9c9e10 commit 330c609Copy full SHA for 330c609
1 file changed
DataFormats/Headers/include/Headers/DataHeader.h
@@ -259,8 +259,8 @@ struct Descriptor {
259
void runtimeInit(std::string_view string)
260
{
261
// empty strings and string longet than the descriptor size are not allowed
262
- if (string.empty() || (string[0] != 0 && string.size() > (int)N)) {
263
- throw std::invalid_argument("argument must not be empty or longer than the descriptor size");
+ if (!string.empty() && (string.size() > (int)N)) {
+ throw std::invalid_argument("argument must not be longer than the descriptor size");
264
}
265
// copy the content directly
266
std::memcpy(str, string.data(), string.size());
0 commit comments