summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/runtime/rtstr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c
index 65cc018..129c9f2 100644
--- a/lib/runtime/rtstr.c
+++ b/lib/runtime/rtstr.c
@@ -126,7 +126,7 @@ RtStrCat (
}
#ifndef __GNUC__
-#pragma RUNTIME_CODE(RtStrCat)
+#pragma RUNTIME_CODE(RtStrnCat)
#endif
VOID
RUNTIMEFUNCTION
@@ -136,7 +136,12 @@ RtStrnCat (
IN UINTN Len
)
{
- RtStrnCpy(Dest+StrLen(Dest), Src, Len);
+ UINTN DestSize, Size;
+
+ DestSize = StrLen(Dest);
+ Size = RtStrnLen(Src, Len);
+ RtCopyMem(Dest + DestSize, Src, Size * sizeof(CHAR16));
+ Dest[DestSize + Size] = '\0';
}
#ifndef __GNUC__