Fix bug in StrnCpy() and AsciStrnCpy(). It was copying Length - 1 characters instead of Length characters.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@34 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2006-04-25 23:30:07 +00:00
parent 27f019223c
commit 6cfb0c24a8
1 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ StrnCpy (
ReturnValue = Destination;
while ((*Source != L'\0') && (Length > 1)) {
while ((*Source != L'\0') && (Length > 0)) {
*(Destination++) = *(Source++);
Length--;
}
@ -481,7 +481,7 @@ AsciiStrnCpy (
ReturnValue = Destination;
while (*Source && Length > 1) {
while (*Source && Length > 0) {
*(Destination++) = *(Source++);
Length--;
}