diff --git a/rEFIt_UEFI/cpp_foundation/XObjArray.h b/rEFIt_UEFI/cpp_foundation/XObjArray.h index 5ececb0ba..9bd694c89 100755 --- a/rEFIt_UEFI/cpp_foundation/XObjArray.h +++ b/rEFIt_UEFI/cpp_foundation/XObjArray.h @@ -183,7 +183,8 @@ void XObjArrayNC::CheckSize(xsize nNewSize, xsize nGrowBy) nNewSize += nGrowBy + 1; _Data = (XObjArrayEntry *)realloc((void *)_Data, sizeof(XObjArrayEntry) * nNewSize, sizeof(XObjArrayEntry) * m_allocatedSize); if ( !_Data ) { - XObjArray_DBG("XObjArrayNC::CheckSize(nNewSize=%llu, nGrowBy=%llu) : Xrealloc(%llu, %llu, %" PRIuPTR ") returned NULL. System halted\n", nNewSize, nGrowBy, m_allocatedSize, sizeof(XObjArrayEntry) * nNewSize, (uintptr_t)_Data); + DebugLog(2, "XObjArrayNC::CheckSize(nNewSize=%llu, nGrowBy=%llu) : Xrealloc(%llu, %llu, %" PRIuPTR ") returned NULL. System halted\n", nNewSize, nGrowBy, m_allocatedSize, sizeof(XObjArrayEntry) * nNewSize, (uintptr_t)_Data); + panic(); } // memset(&_Data[m_allocatedSize], 0, (nNewSize-m_allocatedSize) * sizeof(XObjArrayEntry)); m_allocatedSize = nNewSize; diff --git a/rEFIt_UEFI/cpp_unit_test/XStringW_test.cpp b/rEFIt_UEFI/cpp_unit_test/XStringW_test.cpp index a23b4d0bf..94ad6528a 100755 --- a/rEFIt_UEFI/cpp_unit_test/XStringW_test.cpp +++ b/rEFIt_UEFI/cpp_unit_test/XStringW_test.cpp @@ -162,6 +162,16 @@ int XStringW_tests() #endif #endif + { + XStringW utf16; + utf16.takeValueFrom(L"Выход из подменю, обновление главного меню\n"); + for ( size_t i = 0 ; i < utf16.length() ; i++ ) { + if ( utf16[i] != utf16.wc_str()[i] ) { + return 100; + } + } + } + // XStringW CommonName(L"EFI\\CLOVER\\misc\\screenshot"); // for (UINTN Index = 0; Index < 20; Index++) { // XStringW Name = CommonName + SPrintf("%lld", Index) + L".png";