8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

Improvement #7685 - Add overload FbVarChar::set function for non null-terminated string.

This commit is contained in:
Adriano dos Santos Fernandes 2023-07-26 08:02:05 -03:00
parent 61dc200c0b
commit 736fa42963

View File

@ -270,6 +270,13 @@ struct FbVarChar
length = (ISC_USHORT) (len <= N ? len : N);
memcpy(str, s, length);
}
void set(const char* s, unsigned len)
{
assert(len <= N);
length = (ISC_USHORT) (len <= N ? len : N);
memcpy(str, s, length);
}
};
// This class has memory layout identical to ISC_DATE.