);\r
\r
Index = sizeof (BLUETOOTH_ADDRESS) - 1;\r
- while (!IS_NULL(BluetoothStr) && Index >= 0) {\r
- Walker = SplitStr (&BluetoothStr, L':');\r
- TempBufferSize = StrSize (Walker) + StrLen (L"0x") * sizeof (CHAR16);\r
+ Walker = BluetoothStr;\r
+ while (!IS_NULL(*Walker) && Index >= 0) {\r
+ TempBufferSize = 2 * sizeof(CHAR16) + StrSize(L"0x");\r
TempNumBuffer = AllocateZeroPool (TempBufferSize);\r
if (TempNumBuffer == NULL) {\r
break;\r
}\r
StrCpyS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), L"0x");\r
- StrCatS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), Walker);\r
+ StrnCatS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), Walker, 2);\r
BluetoothDp->BD_ADDR.Address[Index] = (UINT8)Strtoi (TempNumBuffer);\r
FreePool (TempNumBuffer);\r
+ Walker += 2;\r
Index--;\r
}\r
\r