Skip to content

Commit

Permalink
Improvement #7685 - Add overload FbVarChar::set function for non null…
Browse files Browse the repository at this point in the history
…-terminated string.
  • Loading branch information
asfernandes committed Jul 26, 2023
1 parent 61dc200 commit 736fa42
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/include/firebird/Message.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 736fa42

Please sign in to comment.